Dynomotion

Group: DynoMotion Message: 1070 From: tmday7 Date: 5/2/2011
Subject: KFLOP Setup on a Mill/Drill
Hello Tom and all,
I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did all the hard work;) And hopefully this post will help others also, as i need it again :)

Now iam working on a Mill/Drill like this one http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the column and Z Axis.
(Ill post some pics later)

Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3 axis.

All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to control machine.(Ive been using Mach3 for a few years, thats what started this whole DIY CNC adventure. :))

I have installed latest Kmotion software as per Dynomotions instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm, and show feedback from all scales in the Axis window of Kmotion.

So Tom, whats the next steps to setting up KFLOP? :)
Thanks,
Troy
Group: DynoMotion Message: 1071 From: Tom Kerekes Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Start by loading the .mot configuration file called:
 
SimpleStepDirAxis0.mot
 
I think the Gecko G203V drives are best driven using KFLOP's 3.3V LVTTL source-sink output mode.  Select this mode by adding 8 to the channel number as described here: 
 

Test if you can get each axis to move properly using open loop stepper mode from the KMotion Step Response Screen.
 
Regards
TK
 
 

Group: DynoMotion Message: 1072 From: tmday7 Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok, maybe we need to go back further in setup. :)
I got no movement at all.
Troy

Tom Kerekes wrote:
>
> Hi Troy,
>
> Start by loading the .mot configuration file called:
>
> SimpleStepDirAxis0.mot
>
> I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> LVTTL source-sink output mode.  Select this mode by adding 8 to the channel
> number as described here: 
>
> http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
>
> Test if you can get each axis to move properly using open loop stepper mode from
> the KMotion Step Response Screen.
>
> Regards
> TK
>
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Mon, May 2, 2011 11:08:45 AM
> Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
>
>  
> Hello Tom and all,
> I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did
> all the hard work;) And hopefully this post will help others also, as i need it
> again :)
>
> Now iam working on a Mill/Drill like this one
> http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the
> column and Z Axis.
> (Ill post some pics later)
>
> Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V
> drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3
> axis.
>
> All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to
> control machine.(Ive been using Mach3 for a few years, thats what started this
> whole DIY CNC adventure. :))
>
> I have installed latest Kmotion software as per Dynomotions
> instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> and show feedback from all scales in the Axis window of Kmotion.
>
> So Tom, whats the next steps to setting up KFLOP? :)
> Thanks,
> Troy
>
Group: DynoMotion Message: 1073 From: Tom Kerekes Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok, cycle power on KFLOP so everything is in default state.
 
On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
 
Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the pin with a voltmeter does it switch between ~0v and ~ 3V?
 
TK

Group: DynoMotion Message: 1074 From: tmday7 Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I am showing the 3V toggle as i toggle bit 8. But there is no movement of stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have been using that cable on my Parallel Port with Mach3. But i will check pin at PMDX board just to be shore.

Troy


Tom Kerekeswrote:
>
> Ok, cycle power on KFLOP so everything is in default state.
>
> On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
>
> Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the pin with
> a voltmeter does it switch between ~0v and ~ 3V?
>
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Mon, May 2, 2011 3:13:07 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Ok, maybe we need to go back further in setup. :)
> I got no movement at all.
> Troy
>
> Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Start by loading the .mot configuration file called:
> >
> > SimpleStepDirAxis0.mot
> >
> > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > LVTTL source-sink output mode.  Select this mode by adding 8 to the channel
> > number as described here: 
> >
> > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> >
> > Test if you can get each axis to move properly using open loop stepper mode
> >from
> >
> > the KMotion Step Response Screen.
> >
> > Regards
> > TK
> >
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Mon, May 2, 2011 11:08:45 AM
> > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> >
> >  
> > Hello Tom and all,
> > I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did
> >
> > all the hard work;) And hopefully this post will help others also, as i need it
> >
> > again :)
> >
> > Now iam working on a Mill/Drill like this one
> > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the
> > column and Z Axis.
> > (Ill post some pics later)
> >
> > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V
> > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3
> >
> > axis.
> >
> > All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to
> >
> > control machine.(Ive been using Mach3 for a few years, thats what started this
>
> > whole DIY CNC adventure. :))
> >
> > I have installed latest Kmotion software as per Dynomotions
> > instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > and show feedback from all scales in the Axis window of Kmotion.
> >
> > So Tom, whats the next steps to setting up KFLOP? :)
> > Thanks,
> > Troy
> >
>
Group: DynoMotion Message: 1075 From: tmday7 Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Checked cable and all is good.
2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX 125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX will light up, but still no movement, unless it is so small that motors wont move?

2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle the State.

Here is link to the PMDX manual if that helps.
Thanks,
Troy

--- "tmday7" wrote:
>
> I am showing the 3V toggle as i toggle bit 8. But there is no movement of stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have been using that cable on my Parallel Port with Mach3. But i will check pin at PMDX board just to be shore.
>
> Troy
>
>
> Tom Kerekeswrote:
> >
> > Ok, cycle power on KFLOP so everything is in default state.
> >
> > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> >
> > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the pin with
> > a voltmeter does it switch between ~0v and ~ 3V?
> >
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Mon, May 2, 2011 3:13:07 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Ok, maybe we need to go back further in setup. :)
> > I got no movement at all.
> > Troy
> >
> > Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Start by loading the .mot configuration file called:
> > >
> > > SimpleStepDirAxis0.mot
> > >
> > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > LVTTL source-sink output mode.  Select this mode by adding 8 to the channel
> > > number as described here: 
> > >
> > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > >
> > > Test if you can get each axis to move properly using open loop stepper mode
> > >from
> > >
> > > the KMotion Step Response Screen.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Hello Tom and all,
> > > I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did
> > >
> > > all the hard work;) And hopefully this post will help others also, as i need it
> > >
> > > again :)
> > >
> > > Now iam working on a Mill/Drill like this one
> > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the
> > > column and Z Axis.
> > > (Ill post some pics later)
> > >
> > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V
> > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3
> > >
> > > axis.
> > >
> > > All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to
> > >
> > > control machine.(Ive been using Mach3 for a few years, thats what started this
> >
> > > whole DIY CNC adventure. :))
> > >
> > > I have installed latest Kmotion software as per Dynomotions
> > > instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > > and show feedback from all scales in the Axis window of Kmotion.
> > >
> > > So Tom, whats the next steps to setting up KFLOP? :)
> > > Thanks,
> > > Troy
> > >
> >
>
Group: DynoMotion Message: 1076 From: tmday7 Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion. Now when i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15 State and 44,45 Output are toggling.
Whats that about?
Troy

--- "tmday7"wrote:
>
> Checked cable and all is good.
> 2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX 125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX will light up, but still no movement, unless it is so small that motors wont move?
>
> 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle the State.
>
> Here is link to the PMDX manual if that helps.
> Thanks,
> Troy
>
> --- "tmday7" wrote:
> >
> > I am showing the 3V toggle as i toggle bit 8. But there is no movement of stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have been using that cable on my Parallel Port with Mach3. But i will check pin at PMDX board just to be shore.
> >
> > Troy
> >
> >
> > Tom Kerekeswrote:
> > >
> > > Ok, cycle power on KFLOP so everything is in default state.
> > >
> > > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> > >
> > > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the pin with
> > > a voltmeter does it switch between ~0v and ~ 3V?
> > >
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Ok, maybe we need to go back further in setup. :)
> > > I got no movement at all.
> > > Troy
> > >
> > > Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Start by loading the .mot configuration file called:
> > > >
> > > > SimpleStepDirAxis0.mot
> > > >
> > > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > > LVTTL source-sink output mode.  Select this mode by adding 8 to the channel
> > > > number as described here: 
> > > >
> > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > >
> > > > Test if you can get each axis to move properly using open loop stepper mode
> > > >from
> > > >
> > > > the KMotion Step Response Screen.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Hello Tom and all,
> > > > I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did
> > > >
> > > > all the hard work;) And hopefully this post will help others also, as i need it
> > > >
> > > > again :)
> > > >
> > > > Now iam working on a Mill/Drill like this one
> > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the
> > > > column and Z Axis.
> > > > (Ill post some pics later)
> > > >
> > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V
> > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3
> > > >
> > > > axis.
> > > >
> > > > All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to
> > > >
> > > > control machine.(Ive been using Mach3 for a few years, thats what started this
> > >
> > > > whole DIY CNC adventure. :))
> > > >
> > > > I have installed latest Kmotion software as per Dynomotions
> > > > instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > > > and show feedback from all scales in the Axis window of Kmotion.
> > > >
> > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > Thanks,
> > > > Troy
> > > >
> > >
> >
>
Group: DynoMotion Message: 1077 From: TK Date: 5/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,

Each toggle would only be one microstep so it might be hard to see.  But after a few toggles it should be obvious. 

TK

On May 2, 2011, at 7:11 PM, "tmday7" <tmday@...> wrote:

 

Checked cable and all is good.
2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX 125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX will light up, but still no movement, unless it is so small that motors wont move?

2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle the State.

Here is link to the PMDX manual if that helps.
Thanks,
Troy

--- "tmday7" wrote:
>
> I am showing the 3V toggle as i toggle bit 8. But there is no movement of stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have been using that cable on my Parallel Port with Mach3. But i will check pin at PMDX board just to be shore.
>
> Troy
>
>
> Tom Kerekeswrote:
> >
> > Ok, cycle power on KFLOP so everything is in default state.
> >
> > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> >
> > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the pin with
> > a voltmeter does it switch between ~0v and ~ 3V?
> >
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Mon, May 2, 2011 3:13:07 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Ok, maybe we need to go back further in setup. :)
> > I got no movement at all.
> > Troy
> >
> > Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Start by loading the .mot configuration file called:
> > >
> > > SimpleStepDirAxis0.mot
> > >
> > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > LVTTL source-sink output mode.  Select this mode by adding 8 to the channel
> > > number as described here: 
> > >
> > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > >
> > > Test if you can get each axis to move properly using open loop stepper mode
> > >from
> > >
> > > the KMotion Step Response Screen.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Hello Tom and all,
> > > I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did
> > >
> > > all the hard work;) And hopefully this post will help others also, as i need it
> > >
> > > again :)
> > >
> > > Now iam working on a Mill/Drill like this one
> > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the
> > > column and Z Axis.
> > > (Ill post some pics later)
> > >
> > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V
> > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3
> > >
> > > axis.
> > >
> > > All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to
> > >
> > > control machine.(Ive been using Mach3 for a few years, thats what started this
> >
> > > whole DIY CNC adventure. :))
> > >
> > > I have installed latest Kmotion software as per Dynomotions
> > > instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > > and show feedback from all scales in the Axis window of Kmotion.
> > >
> > > So Tom, whats the next steps to setting up KFLOP? :)
> > > Thanks,
> > > Troy
> > >
> >
>

Group: DynoMotion Message: 1078 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
As to seeing movement, i never saw any, even after several clicks.
One more thing i noticed, is after power cycle of KFLOP, Steps LED on the PMDX board would flicker constant, until i checked the #44 and #45 in the Digital I/O screen of Kmotion.
Troy

--- "tmday7"wrote:
>
> Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion. Now when i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15 State and 44,45 Output are toggling.
> Whats that about?
> Troy
>
> --- "tmday7"wrote:
> >
> > Checked cable and all is good.
> > 2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX 125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX will light up, but still no movement, unless it is so small that motors wont move?
> >
> > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle the State.
> >
> > Here is link to the PMDX manual if that helps.
> > Thanks,
> > Troy
> >
> > --- "tmday7" wrote:
> > >
> > > I am showing the 3V toggle as i toggle bit 8. But there is no movement of stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have been using that cable on my Parallel Port with Mach3. But i will check pin at PMDX board just to be shore.
> > >
> > > Troy
> > >
> > >
> > > Tom Kerekeswrote:
> > > >
> > > > Ok, cycle power on KFLOP so everything is in default state.
> > > >
> > > > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> > > >
> > > > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the pin with
> > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > >
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Ok, maybe we need to go back further in setup. :)
> > > > I got no movement at all.
> > > > Troy
> > > >
> > > > Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > Start by loading the .mot configuration file called:
> > > > >
> > > > > SimpleStepDirAxis0.mot
> > > > >
> > > > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > > > LVTTL source-sink output mode.  Select this mode by adding 8 to the channel
> > > > > number as described here: 
> > > > >
> > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > >
> > > > > Test if you can get each axis to move properly using open loop stepper mode
> > > > >from
> > > > >
> > > > > the KMotion Step Response Screen.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > >
> > > > >  
> > > > > Hello Tom and all,
> > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple years ago.(TK did
> > > > >
> > > > > all the hard work;) And hopefully this post will help others also, as i need it
> > > > >
> > > > > again :)
> > > > >
> > > > > Now iam working on a Mill/Drill like this one
> > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built the
> > > > > column and Z Axis.
> > > > > (Ill post some pics later)
> > > > >
> > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko G203V
> > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales on all 3
> > > > >
> > > > > axis.
> > > > >
> > > > > All wiring from B.O.B. and KFLOP is already finished.I have been using Mach3 to
> > > > >
> > > > > control machine.(Ive been using Mach3 for a few years, thats what started this
> > > >
> > > > > whole DIY CNC adventure. :))
> > > > >
> > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > > > > and show feedback from all scales in the Axis window of Kmotion.
> > > > >
> > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1079 From: Tom Kerekes Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
It sounds like luck is not on your side :}
 
You probably have a wiring error.  Possibly a missing ground.  Without a ground it is possible to have the weird cross talk between IOs that you describe. I don't know which PMDX board you have or how you are wired to it.  Maybe you can post a diagram.  You said you included a link but I don't see it. All KFLOP should need to do to cause a step is to toggle the Step line.  If it is doing that and there is no Step then the problem is further down stream.
 
BTW did you Flash any User Programs or Configuration into the board?  This is not necessary or recommended.  If you have please re-Flash the V4.24 Version.
 
Regards
TK

Group: DynoMotion Message: 1080 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Sorry, iam bad for that. :)
http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf

Ill reflash, double check wiring,ill put together a wiring diagram also.
Troy
--- Tom Kerekeswrote:
>
> Hi Troy,
>
> It sounds like luck is not on your side :}
>
> You probably have a wiring error.  Possibly a missing ground.  Without a ground
> it is possible to have the weird cross talk between IOs that you describe. I
> don't know which PMDX board you have or how you are wired to it.  Maybe you can
> post a diagram.  You said you included a link but I don't see it. All KFLOP
> should need to do to cause a step is to toggle the Step line.  If it is doing
> that and there is no Step then the problem is further down stream.
>
> BTW did you Flash any User Programs or Configuration into the board?  This is
> not necessary or recommended.  If you have please re-Flash the V4.24 Version.
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, May 3, 2011 6:11:50 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> As to seeing movement, i never saw any, even after several clicks.
> One more thing i noticed, is after power cycle of KFLOP, Steps LED on the PMDX
> board would flicker constant, until i checked the #44 and #45 in the Digital I/O
> screen of Kmotion.
> Troy
>
> --- "tmday7"wrote:
> >
> > Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion. Now when
> >i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15 State
> >and 44,45 Output are toggling.
> > Whats that about?
> > Troy
> >
> > --- "tmday7"wrote:
> > >
> > > Checked cable and all is good.
> > > 2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX
> >125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX
> >will light up, but still no movement, unless it is so small that motors wont
> >move?
> > >
> > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle
> >the State.
> > >
> > > Here is link to the PMDX manual if that helps.
> > > Thanks,
> > > Troy
> > >
> > > --- "tmday7" wrote:
> > > >
> > > > I am showing the 3V toggle as i toggle bit 8. But there is no movement of
> >stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have
> >been using that cable on my Parallel Port with Mach3. But i will check pin at
> >PMDX board just to be shore.
> > > >
> > > > Troy
> > > >
> > > >
> > > > Tom Kerekeswrote:
> > > > >
> > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > >
> > > > > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> > > > >
> > > > > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the
> >pin with
> >
> > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > >  
> > > > > Ok, maybe we need to go back further in setup. :)
> > > > > I got no movement at all.
> > > > > Troy
> > > > >
> > > > > Tom Kerekes wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >
> > > > > > Start by loading the .mot configuration file called:
> > > > > >
> > > > > > SimpleStepDirAxis0.mot
> > > > > >
> > > > > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > > > > LVTTL source-sink output mode.  Select this mode by adding 8 to
> >the channel
> >
> > > > > > number as described here: 
> > > > > >
> > > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > >
> > > > > > Test if you can get each axis to move properly using open loop stepper
> >mode
> >
> > > > > >from
> > > > > >
> > > > > > the KMotion Step Response Screen.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > >  
> > > > > > Hello Tom and all,
> > > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple years
> >ago.(TK did
> >
> > > > > >
> > > > > > all the hard work;) And hopefully this post will help others also, as i
> >need it
> >
> > > > > >
> > > > > > again :)
> > > > > >
> > > > > > Now iam working on a Mill/Drill like this one
> > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built
> >the
> >
> > > > > > column and Z Axis.
> > > > > > (Ill post some pics later)
> > > > > >
> > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko
> >G203V
> >
> > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales
> >on all 3
> >
> > > > > >
> > > > > > axis.
> > > > > >
> > > > > > All wiring from B.O.B. and KFLOP is already finished.I have been using
> >Mach3 to
> >
> > > > > >
> > > > > > control machine.(Ive been using Mach3 for a few years, thats what
> >started this
> >
> > > > >
> > > > > > whole DIY CNC adventure. :))
> > > > > >
> > > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > >
> >instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> >
> > > > > > and show feedback from all scales in the Axis window of Kmotion.
> > > > > >
> > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1081 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Found it. :)
I remembered when we did the TriOnics mill, it also had a PMDX board.And sumthin we never did finish (I think we didnt) was to use the Charge Pump feature. So i went and disabled the Charge Pump on my PMDX 125 board and all is responding now :) :)

Toggling Bit8 moves X axis. Then i loaded SimpleStepDirAxis0.mot and moved X axis.

So,.. where to go from here?
Troy

--- "tmday7"wrote:
>
> Sorry, iam bad for that. :)
> http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf
>
> Ill reflash, double check wiring,ill put together a wiring diagram also.
> Troy
> --- Tom Kerekeswrote:
> >
> > Hi Troy,
> >
> > It sounds like luck is not on your side :}
> >
> > You probably have a wiring error.  Possibly a missing ground.  Without a ground
> > it is possible to have the weird cross talk between IOs that you describe. I
> > don't know which PMDX board you have or how you are wired to it.  Maybe you can
> > post a diagram.  You said you included a link but I don't see it. All KFLOP
> > should need to do to cause a step is to toggle the Step line.  If it is doing
> > that and there is no Step then the problem is further down stream.
> >
> > BTW did you Flash any User Programs or Configuration into the board?  This is
> > not necessary or recommended.  If you have please re-Flash the V4.24 Version.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tue, May 3, 2011 6:11:50 AM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > As to seeing movement, i never saw any, even after several clicks.
> > One more thing i noticed, is after power cycle of KFLOP, Steps LED on the PMDX
> > board would flicker constant, until i checked the #44 and #45 in the Digital I/O
> > screen of Kmotion.
> > Troy
> >
> > --- "tmday7"wrote:
> > >
> > > Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion. Now when
> > >i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15 State
> > >and 44,45 Output are toggling.
> > > Whats that about?
> > > Troy
> > >
> > > --- "tmday7"wrote:
> > > >
> > > > Checked cable and all is good.
> > > > 2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX
> > >125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX
> > >will light up, but still no movement, unless it is so small that motors wont
> > >move?
> > > >
> > > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle
> > >the State.
> > > >
> > > > Here is link to the PMDX manual if that helps.
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- "tmday7" wrote:
> > > > >
> > > > > I am showing the 3V toggle as i toggle bit 8. But there is no movement of
> > >stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have
> > >been using that cable on my Parallel Port with Mach3. But i will check pin at
> > >PMDX board just to be shore.
> > > > >
> > > > > Troy
> > > > >
> > > > >
> > > > > Tom Kerekeswrote:
> > > > > >
> > > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > > >
> > > > > > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> > > > > >
> > > > > > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the
> > >pin with
> > >
> > > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > > >
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > >  
> > > > > > Ok, maybe we need to go back further in setup. :)
> > > > > > I got no movement at all.
> > > > > > Troy
> > > > > >
> > > > > > Tom Kerekes wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > Start by loading the .mot configuration file called:
> > > > > > >
> > > > > > > SimpleStepDirAxis0.mot
> > > > > > >
> > > > > > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > > > > > LVTTL source-sink output mode.  Select this mode by adding 8 to
> > >the channel
> > >
> > > > > > > number as described here: 
> > > > > > >
> > > > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > > >
> > > > > > > Test if you can get each axis to move properly using open loop stepper
> > >mode
> > >
> > > > > > >from
> > > > > > >
> > > > > > > the KMotion Step Response Screen.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > >  
> > > > > > > Hello Tom and all,
> > > > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple years
> > >ago.(TK did
> > >
> > > > > > >
> > > > > > > all the hard work;) And hopefully this post will help others also, as i
> > >need it
> > >
> > > > > > >
> > > > > > > again :)
> > > > > > >
> > > > > > > Now iam working on a Mill/Drill like this one
> > > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built
> > >the
> > >
> > > > > > > column and Z Axis.
> > > > > > > (Ill post some pics later)
> > > > > > >
> > > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko
> > >G203V
> > >
> > > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales
> > >on all 3
> > >
> > > > > > >
> > > > > > > axis.
> > > > > > >
> > > > > > > All wiring from B.O.B. and KFLOP is already finished.I have been using
> > >Mach3 to
> > >
> > > > > > >
> > > > > > > control machine.(Ive been using Mach3 for a few years, thats what
> > >started this
> > >
> > > > > >
> > > > > > > whole DIY CNC adventure. :))
> > > > > > >
> > > > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > > >
> > >instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > >
> > > > > > > and show feedback from all scales in the Axis window of Kmotion.
> > > > > > >
> > > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1082 From: TK Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,

Seems strange that all that weird behavior would be caused by a missing charge pump. You could wire the charge pump to a KFLOP PWM if you wish. 

The next steps would be to determine your max velocity, acceleration, and Jerk that you would like to use with your system. Note that the units on the Step Response Screen are all in microsteps. Then repeat for all your axes. 

I expect you want to run closed loop from your glass scales. So compute a factor that will convert from encoder counts to microsteps. Enter it into the InputGain0 parameter. If correct the Position and Command plots should nearly match on the Step Response Screen. 


TK

On May 3, 2011, at 9:29 AM, "tmday7" <tmday@...> wrote:

 

Found it. :)
I remembered when we did the TriOnics mill, it also had a PMDX board.And sumthin we never did finish (I think we didnt) was to use the Charge Pump feature. So i went and disabled the Charge Pump on my PMDX 125 board and all is responding now :) :)

Toggling Bit8 moves X axis. Then i loaded SimpleStepDirAxis0.mot and moved X axis.

So,.. where to go from here?
Troy

--- "tmday7"wrote:
>
> Sorry, iam bad for that. :)
> http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf
>
> Ill reflash, double check wiring,ill put together a wiring diagram also.
> Troy
> --- Tom Kerekeswrote:
> >
> > Hi Troy,
> >
> > It sounds like luck is not on your side :}
> >
> > You probably have a wiring error.  Possibly a missing ground.  Without a ground
> > it is possible to have the weird cross talk between IOs that you describe. I
> > don't know which PMDX board you have or how you are wired to it.  Maybe you can
> > post a diagram.  You said you included a link but I don't see it. All KFLOP
> > should need to do to cause a step is to toggle the Step line.  If it is doing
> > that and there is no Step then the problem is further down stream.
> >
> > BTW did you Flash any User Programs or Configuration into the board?  This is
> > not necessary or recommended.  If you have please re-Flash the V4.24 Version.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tue, May 3, 2011 6:11:50 AM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > As to seeing movement, i never saw any, even after several clicks.
> > One more thing i noticed, is after power cycle of KFLOP, Steps LED on the PMDX
> > board would flicker constant, until i checked the #44 and #45 in the Digital I/O
> > screen of Kmotion.
> > Troy
> >
> > --- "tmday7"wrote:
> > >
> > > Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion. Now when
> > >i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15 State
> > >and 44,45 Output are toggling.
> > > Whats that about?
> > > Troy
> > >
> > > --- "tmday7"wrote:
> > > >
> > > > Checked cable and all is good.
> > > > 2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX
> > >125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX
> > >will light up, but still no movement, unless it is so small that motors wont
> > >move?
> > > >
> > > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle
> > >the State.
> > > >
> > > > Here is link to the PMDX manual if that helps.
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- "tmday7" wrote:
> > > > >
> > > > > I am showing the 3V toggle as i toggle bit 8. But there is no movement of
> > >stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have
> > >been using that cable on my Parallel Port with Mach3. But i will check pin at
> > >PMDX board just to be shore.
> > > > >
> > > > > Troy
> > > > >
> > > > >
> > > > > Tom Kerekeswrote:
> > > > > >
> > > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > > >
> > > > > > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> > > > > >
> > > > > > Toggle Bit8 (Step) on and off.  Does the motor Step?  If not check the
> > >pin with
> > >
> > > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > > >
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > >  
> > > > > > Ok, maybe we need to go back further in setup. :)
> > > > > > I got no movement at all.
> > > > > > Troy
> > > > > >
> > > > > > Tom Kerekes wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > Start by loading the .mot configuration file called:
> > > > > > >
> > > > > > > SimpleStepDirAxis0.mot
> > > > > > >
> > > > > > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > > > > > LVTTL source-sink output mode.  Select this mode by adding 8 to
> > >the channel
> > >
> > > > > > > number as described here: 
> > > > > > >
> > > > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > > >
> > > > > > > Test if you can get each axis to move properly using open loop stepper
> > >mode
> > >
> > > > > > >from
> > > > > > >
> > > > > > > the KMotion Step Response Screen.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > >  
> > > > > > > Hello Tom and all,
> > > > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple years
> > >ago.(TK did
> > >
> > > > > > >
> > > > > > > all the hard work;) And hopefully this post will help others also, as i
> > >need it
> > >
> > > > > > >
> > > > > > > again :)
> > > > > > >
> > > > > > > Now iam working on a Mill/Drill like this one
> > > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built
> > >the
> > >
> > > > > > > column and Z Axis.
> > > > > > > (Ill post some pics later)
> > > > > > >
> > > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko
> > >G203V
> > >
> > > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales
> > >on all 3
> > >
> > > > > > >
> > > > > > > axis.
> > > > > > >
> > > > > > > All wiring from B.O.B. and KFLOP is already finished.I have been using
> > >Mach3 to
> > >
> > > > > > >
> > > > > > > control machine.(Ive been using Mach3 for a few years, thats what
> > >started this
> > >
> > > > > >
> > > > > > > whole DIY CNC adventure. :))
> > > > > > >
> > > > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > > >
> > >instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > >
> > > > > > > and show feedback from all scales in the Axis window of Kmotion.
> > > > > > >
> > > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Group: DynoMotion Message: 1083 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
On Configuration window, how do i configure window for next axis?
Troy

--- TK wrote:
>
> Hi Troy,
>
> Seems strange that all that weird behavior would be caused by a missing charge pump. You could wire the charge pump to a KFLOP PWM if you wish.
>
> The next steps would be to determine your max velocity, acceleration, and Jerk that you would like to use with your system. Note that the units on the Step Response Screen are all in microsteps. Then repeat for all your axes.
>
> I expect you want to run closed loop from your glass scales. So compute a factor that will convert from encoder counts to microsteps. Enter it into the InputGain0 parameter. If correct the Position and Command plots should nearly match on the Step Response Screen.
>
>
> TK
>
> On May 3, 2011, at 9:29 AM, "tmday7" <tmday@...> wrote:
>
> > Found it. :)
> > I remembered when we did the TriOnics mill, it also had a PMDX board.And sumthin we never did finish (I think we didnt) was to use the Charge Pump feature. So i went and disabled the Charge Pump on my PMDX 125 board and all is responding now :) :)
> >
> > Toggling Bit8 moves X axis. Then i loaded SimpleStepDirAxis0.mot and moved X axis.
> >
> > So,.. where to go from here?
> > Troy
> >
> > --- "tmday7"wrote:
> > >
> > > Sorry, iam bad for that. :)
> > > http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf
> > >
> > > Ill reflash, double check wiring,ill put together a wiring diagram also.
> > > Troy
> > > --- Tom Kerekeswrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > It sounds like luck is not on your side :}
> > > >
> > > > You probably have a wiring error. Possibly a missing ground. Without a ground
> > > > it is possible to have the weird cross talk between IOs that you describe. I
> > > > don't know which PMDX board you have or how you are wired to it. Maybe you can
> > > > post a diagram. You said you included a link but I don't see it. All KFLOP
> > > > should need to do to cause a step is to toggle the Step line. If it is doing
> > > > that and there is no Step then the problem is further down stream.
> > > >
> > > > BTW did you Flash any User Programs or Configuration into the board? This is
> > > > not necessary or recommended. If you have please re-Flash the V4.24 Version.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tue, May 3, 2011 6:11:50 AM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > Â
> > > > As to seeing movement, i never saw any, even after several clicks.
> > > > One more thing i noticed, is after power cycle of KFLOP, Steps LED on the PMDX
> > > > board would flicker constant, until i checked the #44 and #45 in the Digital I/O
> > > > screen of Kmotion.
> > > > Troy
> > > >
> > > > --- "tmday7"wrote:
> > > > >
> > > > > Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion. Now when
> > > > >i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15 State
> > > > >and 44,45 Output are toggling.
> > > > > Whats that about?
> > > > > Troy
> > > > >
> > > > > --- "tmday7"wrote:
> > > > > >
> > > > > > Checked cable and all is good.
> > > > > > 2 things i noticed when toggling the Bit8, 1st is there is a LED on the PMDX
> > > > >125 board that shows Steps. When i toggle the Bit8, the Steps LED on the PMDX
> > > > >will light up, but still no movement, unless it is so small that motors wont
> > > > >move?
> > > > > >
> > > > > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit will toggle
> > > > >the State.
> > > > > >
> > > > > > Here is link to the PMDX manual if that helps.
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > --- "tmday7" wrote:
> > > > > > >
> > > > > > > I am showing the 3V toggle as i toggle bit 8. But there is no movement of
> > > > >stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as i have
> > > > >been using that cable on my Parallel Port with Mach3. But i will check pin at
> > > > >PMDX board just to be shore.
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > >
> > > > > > > Tom Kerekeswrote:
> > > > > > > >
> > > > > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > > > > >
> > > > > > > > On the Digital I/O Screen set IO Bits 8 and 9 as outputs.
> > > > > > > >
> > > > > > > > Toggle Bit8 (Step) on and off. Does the motor Step? If not check the
> > > > >pin with
> > > > >
> > > > > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > > > > >
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: tmday7 <tmday@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > > >
> > > > > > > > ÂÂ
> > > > > > > > Ok, maybe we need to go back further in setup. :)
> > > > > > > > I got no movement at all.
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > Tom Kerekes wrote:
> > > > > > > > >
> > > > > > > > > Hi Troy,
> > > > > > > > >
> > > > > > > > > Start by loading the .mot configuration file called:
> > > > > > > > >
> > > > > > > > > SimpleStepDirAxis0.mot
> > > > > > > > >
> > > > > > > > > I think the Gecko G203V drives are best driven using KFLOP's 3.3V
> > > > > > > > > LVTTLÃÆ'‚ÂÂ source-sink output mode.ÃÆ'‚ÂÂ Select this mode by adding 8 to
> > > > >the channel
> > > > >
> > > > > > > > > number as described here:ÃÆ'‚ÂÂ
> > > > > > > > >
> > > > > > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > > > > >
> > > > > > > > > Test if you can get each axis to move properly using open loop stepper
> > > > >mode
> > > > >
> > > > > > > > >from
> > > > > > > > >
> > > > > > > > > the KMotion Step Response Screen.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > > > > >
> > > > > > > > > ÃÆ'‚ÂÂ
> > > > > > > > > Hello Tom and all,
> > > > > > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple years
> > > > >ago.(TK did
> > > > >
> > > > > > > > >
> > > > > > > > > all the hard work;) And hopefully this post will help others also, as i
> > > > >need it
> > > > >
> > > > > > > > >
> > > > > > > > > again :)
> > > > > > > > >
> > > > > > > > > Now iam working on a Mill/Drill like this one
> > > > > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except i built
> > > > >the
> > > > >
> > > > > > > > > column and Z Axis.
> > > > > > > > > (Ill post some pics later)
> > > > > > > > >
> > > > > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis, Gecko
> > > > >G203V
> > > > >
> > > > > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear scales
> > > > >on all 3
> > > > >
> > > > > > > > >
> > > > > > > > > axis.
> > > > > > > > >
> > > > > > > > > All wiring from B.O.B. and KFLOP is already finished.I have been using
> > > > >Mach3 to
> > > > >
> > > > > > > > >
> > > > > > > > > control machine.(Ive been using Mach3 for a few years, thats what
> > > > >started this
> > > > >
> > > > > > > >
> > > > > > > > > whole DIY CNC adventure. :))
> > > > > > > > >
> > > > > > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > > > > >
> > > > >instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > > > >
> > > > > > > > > and show feedback from all scales in the Axis window of Kmotion.
> > > > > > > > >
> > > > > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > > > > Thanks,
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>
Group: DynoMotion Message: 1084 From: Tom Kerekes Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Assuming all the axes are similar and you wired the Step/Dirs and Encoders in sequence, save the fist configured axis to a *.mot file then load it into the other axis and add 1 to both the InputChan0 and OutputChan0.
 
TK

Group: DynoMotion Message: 1085 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok. This is what i have (X Axis)Channel 0, Input Channel 0, Output Channel 8...(Y Axis)Channel 1, Input Channel 1, Output Channel 9...(Z Axis)Channel 2, Input Channel 2, Output Channel 10...

That sound right?
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Assuming all the axes are similar and you wired the Step/Dirs and Encoders in
> sequence, save the fist configured axis to a *.mot file then load it into the
> other axis and add 1 to both the InputChan0 and OutputChan0.
>
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, May 3, 2011 1:28:46 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> On Configuration window, how do i configure window for next axis?
> Troy
>
> --- TK wrote:
> >
> > Hi Troy,
> >
> > Seems strange that all that weird behavior would be caused by a missing charge
> >pump. You could wire the charge pump to a KFLOP PWM if you wish.
> >
> >
> > The next steps would be to determine your max velocity, acceleration, and Jerk
> >that you would like to use with your system. Note that the units on the Step
> >Response Screen are all in microsteps. Then repeat for all your axes.
> >
> >
> > I expect you want to run closed loop from your glass scales. So compute a
> >factor that will convert from encoder counts to microsteps. Enter it into the
> >InputGain0 parameter. If correct the Position and Command plots should nearly
> >match on the Step Response Screen.
> >
> >
> >
> > TK
> >
> > On May 3, 2011, at 9:29 AM, "tmday7" <tmday@> wrote:
> >
> > > Found it. :)
> > > I remembered when we did the TriOnics mill, it also had a PMDX board.And
> >sumthin we never did finish (I think we didnt) was to use the Charge Pump
> >feature. So i went and disabled the Charge Pump on my PMDX 125 board and all is
> >responding now :) :)
> >
> > >
> > > Toggling Bit8 moves X axis. Then i loaded SimpleStepDirAxis0.mot and moved X
> >axis.
> > >
> > > So,.. where to go from here?
> > > Troy
> > >
> > > --- "tmday7"wrote:
> > > >
> > > > Sorry, iam bad for that. :)
> > > > http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf
> > > >
> > > > Ill reflash, double check wiring,ill put together a wiring diagram also.
> > > > Troy
> > > > --- Tom Kerekeswrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > It sounds like luck is not on your side :}
> > > > >
> > > > > You probably have a wiring error. Possibly a missing ground. Without
> >a ground
> >
> > > > > it is possible to have the weird cross talk between IOs that you
> >describe. I
> >
> > > > > don't know which PMDX board you have or how you are wired to it. Maybe
> >you can
> >
> > > > > post a diagram. You said you included a link but I don't see it. All
> >KFLOP
> >
> > > > > should need to do to cause a step is to toggle the Step line. If it is
> >doing
> >
> > > > > that and there is no Step then the problem is further down stream.
> > > > >
> > > > > BTW did you Flash any User Programs or Configuration into the board?Â
> >This is
> >
> > > > > not necessary or recommended. If you have please re-Flash the V4.24
> >Version.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tue, May 3, 2011 6:11:50 AM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > Â
> > > > > As to seeing movement, i never saw any, even after several clicks.
> > > > > One more thing i noticed, is after power cycle of KFLOP, Steps LED on the
> >PMDX
> >
> > > > > board would flicker constant, until i checked the #44 and #45 in the
> >Digital I/O
> >
> > > > > screen of Kmotion.
> > > > > Troy
> > > > >
> > > > > --- "tmday7"wrote:
> > > > > >
> > > > > > Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion.
> >Now when
> >
> > > > > >i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15
> >State
> >
> > > > > >and 44,45 Output are toggling.
> > > > > > Whats that about?
> > > > > > Troy
> > > > > >
> > > > > > --- "tmday7"wrote:
> > > > > > >
> > > > > > > Checked cable and all is good.
> > > > > > > 2 things i noticed when toggling the Bit8, 1st is there is a LED on
> >the PMDX
> >
> > > > > >125 board that shows Steps. When i toggle the Bit8, the Steps LED on the
> >PMDX
> >
> > > > > >will light up, but still no movement, unless it is so small that motors
> >wont
> >
> > > > > >move?
> > > > > > >
> > > > > > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit
> >will toggle
> >
> > > > > >the State.
> > > > > > >
> > > > > > > Here is link to the PMDX manual if that helps.
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > > > --- "tmday7" wrote:
> > > > > > > >
> > > > > > > > I am showing the 3V toggle as i toggle bit 8. But there is no
> >movement of
> >
> > > > > >stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as
> >i have
> >
> > > > > >been using that cable on my Parallel Port with Mach3. But i will check
> >pin at
> >
> > > > > >PMDX board just to be shore.
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > >
> > > > > > > > Tom Kerekeswrote:
> > > > > > > > >
> > > > > > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > > > > > >
> > > > > > > > > On the Digital I/O Screen set IO Bits 8 and 9 asÃÆ'‚Â outputs.
> > > > > > > > >
> > > > > > > > > Toggle Bit8 (Step) on and off.ÃÆ'‚Â Does the motor Step?ÃÆ'‚Â
> >If not check the
> >
> > > > > >pin with
> > > > > >
> > > > > > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > > > > > >
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > > > >
> > > > > > > > > ÃÆ'‚Â
> > > > > > > > > Ok, maybe we need to go back further in setup. :)
> > > > > > > > > I got no movement at all.
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > Tom Kerekes wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Troy,
> > > > > > > > > >
> > > > > > > > > > Start by loading the .mot configuration file called:
> > > > > > > > > >
> > > > > > > > > > SimpleStepDirAxis0.mot
> > > > > > > > > >
> > > > > > > > > > I think the Gecko G203V drives are best driven using KFLOP's
> >3.3V
> >
> > > > > > > > > > LVTTLÃÆ'Æ'‚ÃÆ'‚Â source-sink output
> >mode.ÃÆ'Æ'‚ÃÆ'‚Â Select this mode by adding 8 to
> >
> > > > > >the channel
> > > > > >
> > > > > > > > > > number as described here:ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > > >
> > > > > > > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > > > > > >
> > > > > > > > > > Test if you can get each axis to move properly using open loop
> >stepper
> >
> > > > > >mode
> > > > > >
> > > > > > > > > >from
> > > > > > > > > >
> > > > > > > > > > the KMotion Step Response Screen.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > > > Hello Tom and all,
> > > > > > > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple
> >years
> >
> > > > > >ago.(TK did
> > > > > >
> > > > > > > > > >
> > > > > > > > > > all the hard work;) And hopefully this post will help others
> >also, as i
> >
> > > > > >need it
> > > > > >
> > > > > > > > > >
> > > > > > > > > > again :)
> > > > > > > > > >
> > > > > > > > > > Now iam working on a Mill/Drill like this one
> > > > > > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except
> >i built
> >
> > > > > >the
> > > > > >
> > > > > > > > > > column and Z Axis.
> > > > > > > > > > (Ill post some pics later)
> > > > > > > > > >
> > > > > > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis,
> >Gecko
> >
> > > > > >G203V
> > > > > >
> > > > > > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear
> >scales
> >
> > > > > >on all 3
> > > > > >
> > > > > > > > > >
> > > > > > > > > > axis.
> > > > > > > > > >
> > > > > > > > > > All wiring from B.O.B. and KFLOP is already finished.I have
> >been using
> >
> > > > > >Mach3 to
> > > > > >
> > > > > > > > > >
> > > > > > > > > > control machine.(Ive been using Mach3 for a few years, thats
> >what
> >
> > > > > >started this
> > > > > >
> > > > > > > > >
> > > > > > > > > > whole DIY CNC adventure. :))
> > > > > > > > > >
> > > > > > > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > > > > > >
> > > > >
> >>instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> >
> > > > > >
> > > > > > > > > > and show feedback from all scales in the Axis window of
> >Kmotion.
> > > > > > > > > >
> > > > > > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > > > > > Thanks,
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
>
Group: DynoMotion Message: 1086 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
You said "convert from encoder counts to microsteps. Enter it into the InputGain0 parameter."

How do i convert?

Testing Certificate for scale says Resolution is 5.0 um
Thanks,
Troy

--- "tmday7"wrote:
>
> Ok. This is what i have (X Axis)Channel 0, Input Channel 0, Output Channel 8...(Y Axis)Channel 1, Input Channel 1, Output Channel 9...(Z Axis)Channel 2, Input Channel 2, Output Channel 10...
>
> That sound right?
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Assuming all the axes are similar and you wired the Step/Dirs and Encoders in
> > sequence, save the fist configured axis to a *.mot file then load it into the
> > other axis and add 1 to both the InputChan0 and OutputChan0.
> >
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tue, May 3, 2011 1:28:46 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > On Configuration window, how do i configure window for next axis?
> > Troy
> >
> > --- TK wrote:
> > >
> > > Hi Troy,
> > >
> > > Seems strange that all that weird behavior would be caused by a missing charge
> > >pump. You could wire the charge pump to a KFLOP PWM if you wish.
> > >
> > >
> > > The next steps would be to determine your max velocity, acceleration, and Jerk
> > >that you would like to use with your system. Note that the units on the Step
> > >Response Screen are all in microsteps. Then repeat for all your axes.
> > >
> > >
> > > I expect you want to run closed loop from your glass scales. So compute a
> > >factor that will convert from encoder counts to microsteps. Enter it into the
> > >InputGain0 parameter. If correct the Position and Command plots should nearly
> > >match on the Step Response Screen.
> > >
> > >
> > >
> > > TK
> > >
> > > On May 3, 2011, at 9:29 AM, "tmday7" <tmday@> wrote:
> > >
> > > > Found it. :)
> > > > I remembered when we did the TriOnics mill, it also had a PMDX board.And
> > >sumthin we never did finish (I think we didnt) was to use the Charge Pump
> > >feature. So i went and disabled the Charge Pump on my PMDX 125 board and all is
> > >responding now :) :)
> > >
> > > >
> > > > Toggling Bit8 moves X axis. Then i loaded SimpleStepDirAxis0.mot and moved X
> > >axis.
> > > >
> > > > So,.. where to go from here?
> > > > Troy
> > > >
> > > > --- "tmday7"wrote:
> > > > >
> > > > > Sorry, iam bad for that. :)
> > > > > http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf
> > > > >
> > > > > Ill reflash, double check wiring,ill put together a wiring diagram also.
> > > > > Troy
> > > > > --- Tom Kerekeswrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >
> > > > > > It sounds like luck is not on your side :}
> > > > > >
> > > > > > You probably have a wiring error. Possibly a missing ground. Without
> > >a ground
> > >
> > > > > > it is possible to have the weird cross talk between IOs that you
> > >describe. I
> > >
> > > > > > don't know which PMDX board you have or how you are wired to it. Maybe
> > >you can
> > >
> > > > > > post a diagram. You said you included a link but I don't see it. All
> > >KFLOP
> > >
> > > > > > should need to do to cause a step is to toggle the Step line. If it is
> > >doing
> > >
> > > > > > that and there is no Step then the problem is further down stream.
> > > > > >
> > > > > > BTW did you Flash any User Programs or Configuration into the board?Â
> > >This is
> > >
> > > > > > not necessary or recommended. If you have please re-Flash the V4.24
> > >Version.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tue, May 3, 2011 6:11:50 AM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > > Â
> > > > > > As to seeing movement, i never saw any, even after several clicks.
> > > > > > One more thing i noticed, is after power cycle of KFLOP, Steps LED on the
> > >PMDX
> > >
> > > > > > board would flicker constant, until i checked the #44 and #45 in the
> > >Digital I/O
> > >
> > > > > > screen of Kmotion.
> > > > > > Troy
> > > > > >
> > > > > > --- "tmday7"wrote:
> > > > > > >
> > > > > > > Noticed sumthinelse, did a power cycle of KFLOP and restarted Kmotion.
> > >Now when
> > >
> > > > > > >i go to the Digital I/O window Output 8 threw 15 are checked, 8 threw 15
> > >State
> > >
> > > > > > >and 44,45 Output are toggling.
> > > > > > > Whats that about?
> > > > > > > Troy
> > > > > > >
> > > > > > > --- "tmday7"wrote:
> > > > > > > >
> > > > > > > > Checked cable and all is good.
> > > > > > > > 2 things i noticed when toggling the Bit8, 1st is there is a LED on
> > >the PMDX
> > >
> > > > > > >125 board that shows Steps. When i toggle the Bit8, the Steps LED on the
> > >PMDX
> > >
> > > > > > >will light up, but still no movement, unless it is so small that motors
> > >wont
> > >
> > > > > > >move?
> > > > > > > >
> > > > > > > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit
> > >will toggle
> > >
> > > > > > >the State.
> > > > > > > >
> > > > > > > > Here is link to the PMDX manual if that helps.
> > > > > > > > Thanks,
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- "tmday7" wrote:
> > > > > > > > >
> > > > > > > > > I am showing the 3V toggle as i toggle bit 8. But there is no
> > >movement of
> > >
> > > > > > >stepper motor. I know that Parallel cable from KFLOP to PMDX is good, as
> > >i have
> > >
> > > > > > >been using that cable on my Parallel Port with Mach3. But i will check
> > >pin at
> > >
> > > > > > >PMDX board just to be shore.
> > > > > > > > >
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Tom Kerekeswrote:
> > > > > > > > > >
> > > > > > > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > > > > > > >
> > > > > > > > > > On the Digital I/O Screen set IO Bits 8 and 9 asÃÆ'‚Â outputs.
> > > > > > > > > >
> > > > > > > > > > Toggle Bit8 (Step) on and off.ÃÆ'‚Â Does the motor Step?ÃÆ'‚Â
> > >If not check the
> > >
> > > > > > >pin with
> > > > > > >
> > > > > > > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > > > > > > >
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > > > > >
> > > > > > > > > > ÃÆ'‚Â
> > > > > > > > > > Ok, maybe we need to go back further in setup. :)
> > > > > > > > > > I got no movement at all.
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > Tom Kerekes wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Troy,
> > > > > > > > > > >
> > > > > > > > > > > Start by loading the .mot configuration file called:
> > > > > > > > > > >
> > > > > > > > > > > SimpleStepDirAxis0.mot
> > > > > > > > > > >
> > > > > > > > > > > I think the Gecko G203V drives are best driven using KFLOP's
> > >3.3V
> > >
> > > > > > > > > > > LVTTLÃÆ'Æ'‚ÃÆ'‚Â source-sink output
> > >mode.ÃÆ'Æ'‚ÃÆ'‚Â Select this mode by adding 8 to
> > >
> > > > > > >the channel
> > > > > > >
> > > > > > > > > > > number as described here:ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > > > >
> > > > > > > > > > > http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > > > > > > >
> > > > > > > > > > > Test if you can get each axis to move properly using open loop
> > >stepper
> > >
> > > > > > >mode
> > > > > > >
> > > > > > > > > > >from
> > > > > > > > > > >
> > > > > > > > > > > the KMotion Step Response Screen.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > > > > Hello Tom and all,
> > > > > > > > > > > I have setup a KFLOP on a Bridgeport type mill once, a couple
> > >years
> > >
> > > > > > >ago.(TK did
> > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > all the hard work;) And hopefully this post will help others
> > >also, as i
> > >
> > > > > > >need it
> > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > again :)
> > > > > > > > > > >
> > > > > > > > > > > Now iam working on a Mill/Drill like this one
> > > > > > > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00, except
> > >i built
> > >
> > > > > > >the
> > > > > > >
> > > > > > > > > > > column and Z Axis.
> > > > > > > > > > > (Ill post some pics later)
> > > > > > > > > > >
> > > > > > > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3 axis,
> > >Gecko
> > >
> > > > > > >G203V
> > > > > > >
> > > > > > > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and linear
> > >scales
> > >
> > > > > > >on all 3
> > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > axis.
> > > > > > > > > > >
> > > > > > > > > > > All wiring from B.O.B. and KFLOP is already finished.I have
> > >been using
> > >
> > > > > > >Mach3 to
> > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > control machine.(Ive been using Mach3 for a few years, thats
> > >what
> > >
> > > > > > >started this
> > > > > > >
> > > > > > > > > >
> > > > > > > > > > > whole DIY CNC adventure. :))
> > > > > > > > > > >
> > > > > > > > > > > I have installed latest Kmotion software as per Dynomotions
> > > > > > > > > > >
> > > > > >
> > >>instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> > >
> > > > > > >
> > > > > > > > > > > and show feedback from all scales in the Axis window of
> > >Kmotion.
> > > > > > > > > > >
> > > > > > > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > > > > > > Thanks,
> > > > > > > > > > > Troy
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1087 From: Tom Kerekes Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
First compute the number of microsteps per inch resolution your system has.  You should know all the mechanical components of your system.  Such as the number of full steps/rev of your motors (usually 200), the amount of microstepping for your amplifiers (usually 10 for Geckos), any pulley or gear ratios in your drive(I'll assume none or 1:1), and the number of turns per inch of your lead screw (usually around 5tpi).
 
200 x 10 x 1 x 5 = 10000 microsteps per inch
 
Test by commanding a move of 100000 microsteps and measure if the axis moves 10 inches.
 
Next compute the encoder resolution in counts per inch.  Although it says 5um that might be cycles or there might be 10X interpolation or something else.  So test this my moving a known distance for example of 100mm and check if you get 20000 encoder counts or if you get some multiple of that.  If it is 5um per count the resolution per inch would be.
 
1inch/5um = 25.4mm/5um = 5080 encoder counts/inch
 
Therefore to match the resolutions set:
 
InputGain0 = 10000/5080 = 1.9685
 
Regards
TK

Group: DynoMotion Message: 1088 From: tmday7 Date: 5/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok Tom :) You have to put it in dum machinist terms for me ;)

I Have a 2:1 Pulley Ratio 5tpi ball screw.
Geckos G203V http://www.geckodrive.com/g203v-p-34.html which i believe is 10 microstep as you said.

Calculations didnt workout right at 20000 per inch. Instead i came up with 15,038-15,050, using an indicator to measure travel.

Manufacture of scales advertise them as being .0002" Resolution
You wrote"...and check if you get 20000 encoder counts...".
Where can i see the encoder counts in Kmotion?

Here is links to Kmotion screen shots of X axis config and response.

http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/329027615/view?picmode=&mode=tn&order=ordinal&start=1&count=20&dir=asc

http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/329027615/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc

Sorry about all these dum questions. :)
Thanks,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>
> First compute the number of microsteps per inch resolution your system has.  You
> should know all the mechanical components of your system.  Such as the number of
> full steps/rev of your motors (usually 200), the amount of microstepping for
> your amplifiers (usually 10 for Geckos), any pulley or gear ratios in your
> drive(I'll assume none or 1:1), and the number of turns per inch of your lead
> screw (usually around 5tpi).
>
> 200 x 10 x 1 x 5 = 10000 microsteps per inch
>
> Test by commanding a move of 100000 microsteps and measure if the axis moves 10
> inches.
>
> Next compute the encoder resolution in counts per inch.  Although it says 5um
> that might be cycles or there might be 10X interpolation or something else.  So
> test this my moving a known distance for example of 100mm and check if you get
> 20000 encoder counts or if you get some multiple of that.  If it is 5um per
> count the resolution per inch would be.
>
> 1inch/5um = 25.4mm/5um = 5080 encoder counts/inch
>
> Therefore to match the resolutions set:
>
> InputGain0 = 10000/5080 = 1.9685
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, May 3, 2011 3:05:14 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> You said "convert from encoder counts to microsteps. Enter it into the
> InputGain0 parameter."
>
>
> How do i convert?
>
> Testing Certificate for scale says Resolution is 5.0 um
> Thanks,
> Troy
>
> --- "tmday7"wrote:
> >
> > Ok. This is what i have (X Axis)Channel 0, Input Channel 0, Output Channel
> >8...(Y Axis)Channel 1, Input Channel 1, Output Channel 9...(Z Axis)Channel 2,
> >Input Channel 2, Output Channel 10...
> >
> > That sound right?
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Assuming all the axes are similar and you wired the Step/Dirs and Encoders in
> >
> > > sequence, save the fist configured axis to a *.mot file then load it into the
> >
> > > other axis and add 1 to both the InputChan0 and OutputChan0.
> > >
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tue, May 3, 2011 1:28:46 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > On Configuration window, how do i configure window for next axis?
> > > Troy
> > >
> > > --- TK wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Seems strange that all that weird behavior would be caused by a missing
> >charge
> >
> > > >pump. You could wire the charge pump to a KFLOP PWM if you wish.
> > > >
> > > >
> > > > The next steps would be to determine your max velocity, acceleration, and
> >Jerk
> >
> > > >that you would like to use with your system. Note that the units on the Step
> >
> > > >Response Screen are all in microsteps. Then repeat for all your axes.
> > > >
> > > >
> > > > I expect you want to run closed loop from your glass scales. So compute a
> > > >factor that will convert from encoder counts to microsteps. Enter it into
> >the
> >
> > > >InputGain0 parameter. If correct the Position and Command plots should
> >nearly
> >
> > > >match on the Step Response Screen.
> > > >
> > > >
> > > >
> > > > TK
> > > >
> > > > On May 3, 2011, at 9:29 AM, "tmday7" <tmday@> wrote:
> > > >
> > > > > Found it. :)
> > > > > I remembered when we did the TriOnics mill, it also had a PMDX board.And
>
> > > >sumthin we never did finish (I think we didnt) was to use the Charge Pump
> > > >feature. So i went and disabled the Charge Pump on my PMDX 125 board and all
> >is
> >
> > > >responding now :) :)
> > > >
> > > > >
> > > > > Toggling Bit8 moves X axis. Then i loaded SimpleStepDirAxis0.mot and
> >moved X
> >
> > > >axis.
> > > > >
> > > > > So,.. where to go from here?
> > > > > Troy
> > > > >
> > > > > --- "tmday7"wrote:
> > > > > >
> > > > > > Sorry, iam bad for that. :)
> > > > > > http://www.pmdx.com/Doc/Archive/PMDX-125_Manual_04.pdf
> > > > > >
> > > > > > Ill reflash, double check wiring,ill put together a wiring diagram
> >also.
> > > > > > Troy
> > > > > > --- Tom Kerekeswrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > It sounds like luck is not on your side :}
> > > > > > >
> > > > > > > You probably have a wiring error.ÃÆ'‚ Possibly a missing
> >ground.ÃÆ'‚ Without
> >
> > > >a ground
> > > >
> > > > > > > it is possible to have the weird cross talk between IOs that you
> > > >describe.ÃÆ'‚ I
> > > >
> > > > > > > don't know which PMDX board you have or how you are wired to it.ÃÆ'‚
> >Maybe
> >
> > > >you can
> > > >
> > > > > > > post a diagram.ÃÆ'‚ You said you included a link but I don't see it.
> >All
> >
> > > >KFLOP
> > > >
> > > > > > > should need to do to cause a step is to toggle the Step line.ÃÆ'‚ If
> >it is
> >
> > > >doing
> > > >
> > > > > > > that and there is no Step then the problem is further down stream.
> > > > > > >
> > > > > > > BTW did you Flash any User Programs or Configuration into the
> >board?ÃÆ'‚
> >
> > > >This is
> > > >
> > > > > > > not necessary or recommended.ÃÆ'‚ If you have please re-Flash the
> >V4.24
> >
> > > >Version.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Tue, May 3, 2011 6:11:50 AM
> > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > > ÃÆ'‚
> > > > > > > As to seeing movement, i never saw any, even after several clicks.
> > > > > > > One more thing i noticed, is after power cycle of KFLOP, Steps LED on
> >the
> >
> > > >PMDX
> > > >
> > > > > > > board would flicker constant, until i checked the #44 and #45 in the
>
> > > >Digital I/O
> > > >
> > > > > > > screen of Kmotion.
> > > > > > > Troy
> > > > > > >
> > > > > > > --- "tmday7"wrote:
> > > > > > > >
> > > > > > > > Noticed sumthinelse, did a power cycle of KFLOP and restarted
> >Kmotion.
> >
> > > >Now when
> > > >
> > > > > > > >i go to the Digital I/O window Output 8 threw 15 are checked, 8
> >threw 15
> >
> > > >State
> > > >
> > > > > > > >and 44,45 Output are toggling.
> > > > > > > > Whats that about?
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- "tmday7"wrote:
> > > > > > > > >
> > > > > > > > > Checked cable and all is good.
> > > > > > > > > 2 things i noticed when toggling the Bit8, 1st is there is a LED
> >on
> >
> > > >the PMDX
> > > >
> > > > > > > >125 board that shows Steps. When i toggle the Bit8, the Steps LED on
> >the
> >
> > > >PMDX
> > > >
> > > > > > > >will light up, but still no movement, unless it is so small that
> >motors
> >
> > > >wont
> > > >
> > > > > > > >move?
> > > > > > > > >
> > > > > > > > > 2nd is, when i toggle Bit8 Limit +1, Home 2 and 3 and the #44 bit
> >
> > > >will toggle
> > > >
> > > > > > > >the State.
> > > > > > > > >
> > > > > > > > > Here is link to the PMDX manual if that helps.
> > > > > > > > > Thanks,
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- "tmday7" wrote:
> > > > > > > > > >
> > > > > > > > > > I am showing the 3V toggle as i toggle bit 8. But there is no
> > > >movement of
> > > >
> > > > > > > >stepper motor. I know that Parallel cable from KFLOP to PMDX is
> >good, as
> >
> > > >i have
> > > >
> > > > > > > >been using that cable on my Parallel Port with Mach3. But i will
> >check
> >
> > > >pin at
> > > >
> > > > > > > >PMDX board just to be shore.
> > > > > > > > > >
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Tom Kerekeswrote:
> > > > > > > > > > >
> > > > > > > > > > > Ok, cycle power on KFLOP so everything is in default state.
> > > > > > > > > > >
> > > > > > > > > > > On the Digital I/O Screen set IO Bits 8 and 9
> >asÃÆ'Æ'‚ÃÆ'‚ outputs.
> > > > > > > > > > >
> > > > > > > > > > > Toggle Bit8 (Step) on and off.ÃÆ'Æ'‚ÃÆ'‚ Does the motor
> >Step?ÃÆ'Æ'‚ÃÆ'‚
> >
> > > >If not check the
> > > >
> > > > > > > >pin with
> > > > > > > >
> > > > > > > > > > > a voltmeter does it switch between ~0v and ~ 3V?
> > > > > > > > > > >
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Mon, May 2, 2011 3:13:07 PM
> > > > > > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚
> > > > > > > > > > > Ok, maybe we need to go back further in setup. :)
> > > > > > > > > > > I got no movement at all.
> > > > > > > > > > > Troy
> > > > > > > > > > >
> > > > > > > > > > > Tom Kerekes wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > >
> > > > > > > > > > > > Start by loading the .mot configuration file called:
> > > > > > > > > > > >
> > > > > > > > > > > > SimpleStepDirAxis0.mot
> > > > > > > > > > > >
> > > > > > > > > > > > I think the Gecko G203V drives are best driven using
> >KFLOP's
> >
> > > >3.3V
> > > >
> > > > > > > > > > > > LVTTLÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ source-sink
> >output
> >
> > > >mode.ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Select this mode by adding 8 to
>
> > > >
> > > > > > > >the channel
> > > > > > > >
> > > > > > > > > > > > number as described
> >here:ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚
> >
> > > > > > > > > > > >
> > > > > > > > > > > >
> >http://www.dynomotion.com/Help/StepAndDirection/StepAndDir.htm
> > > > > > > > > > > >
> > > > > > > > > > > > Test if you can get each axis to move properly using open
> >loop
> >
> > > >stepper
> > > >
> > > > > > > >mode
> > > > > > > >
> > > > > > > > > > > >from
> > > > > > > > > > > >
> > > > > > > > > > > > the KMotion Step Response Screen.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Mon, May 2, 2011 11:08:45 AM
> > > > > > > > > > > > Subject: [DynoMotion] KFLOP Setup on a Mill/Drill
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚
> > > > > > > > > > > > Hello Tom and all,
> > > > > > > > > > > > I have setup a KFLOP on a Bridgeport type mill once, a
> >couple
> >
> > > >years
> > > >
> > > > > > > >ago.(TK did
> > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > all the hard work;) And hopefully this post will help
> >others
> >
> > > >also, as i
> > > >
> > > > > > > >need it
> > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > again :)
> > > > > > > > > > > >
> > > > > > > > > > > > Now iam working on a Mill/Drill like this one
> > > > > > > > > > > > http://www.use-enco.com/CGI/INPDFF?PMPAGE=594&PMCTLG=00,
> >except
> >
> > > >i built
> > > >
> > > > > > > >the
> > > > > > > >
> > > > > > > > > > > > column and Z Axis.
> > > > > > > > > > > > (Ill post some pics later)
> > > > > > > > > > > >
> > > > > > > > > > > > Iam using 906 oz/in steppers, 2:1 pulley ratio on all 3
> >axis,
> >
> > > >Gecko
> > > >
> > > > > > > >G203V
> > > > > > > >
> > > > > > > > > > > > drives, PMDX-125 breakout board, 3/4 inch ballscrews and
> >linear
> >
> > > >scales
> > > >
> > > > > > > >on all 3
> > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > axis.
> > > > > > > > > > > >
> > > > > > > > > > > > All wiring from B.O.B. and KFLOP is already finished.I have
> >
> > > >been using
> > > >
> > > > > > > >Mach3 to
> > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > control machine.(Ive been using Mach3 for a few years,
> >thats
> >
> > > >what
> > > >
> > > > > > > >started this
> > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > whole DIY CNC adventure. :))
> > > > > > > > > > > >
> > > > > > > > > > > > I have installed latest Kmotion software as per Dynomotions
> >
> > > > > > > > > > > >
> > > > > > >
> > >
> >>>instructions..http://dynomotion.com/Help/KFLOPQuickStart/KFLOPQuickStart.htm,
> >
> > > >
> > > > > > > >
> > > > > > > > > > > > and show feedback from all scales in the Axis window of
> > > >Kmotion.
> > > > > > > > > > > >
> > > > > > > > > > > > So Tom, whats the next steps to setting up KFLOP? :)
> > > > > > > > > > > > Thanks,
> > > > > > > > > > > > Troy
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1089 From: Tom Kerekes Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
You have an an unexplained factor of 3/4 in your motor drive somewhere.
 
Run experiments to find the dicrepency.
 
If you command a move of 2000 steps does the motor move 1 revolution?
 
Does the Lead screw turn 1/2 revolution? 
 
Does the table advance 0.100 inches?
 
TK
 
 

Group: DynoMotion Message: 1090 From: tmday7 Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ahhh!!! I was remembering TriOnics mill, IT is a 2:1, on mine i made it a little less 1.5:1 ..Duh :) Sorry, its been over a year since
i messed with this machine. Starting to get the "cobwebs" out now ;)

So the 15,000 steps per inch is right and the 15,038-15,050 i
had before to get a full 1.00" of movement is because of mechanical slop?

When i did test of 2000 steps , it moved .130 - .132", motor turned 1 turn, screw turned almost 3/4(going by a mark and eye).

Thanks again,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>
> You have an an unexplained factor of 3/4 in your motor drive somewhere.
>
> Run experiments to find the dicrepency.
>
> If you command a move of 2000 steps does the motor move 1 revolution?
>
> Does the Lead screw turn 1/2 revolution? 
>
> Does the table advance 0.100 inches?
>
> TK
>
>  

> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, May 3, 2011 7:06:40 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Ok Tom :) You have to put it in dum machinist terms for me ;)
>
> I Have a 2:1 Pulley Ratio 5tpi ball screw.
> Geckos G203V http://www.geckodrive.com/g203v-p-34.html which i believe is 10
> microstep as you said.
>
> Calculations didnt workout right at 20000 per inch. Instead i came up with
> 15,038-15,050, using an indicator to measure travel.
>
> Manufacture of scales advertise them as being .0002" Resolution
> You wrote"...and check if you get 20000 encoder counts...".
> Where can i see the encoder counts in Kmotion?
>
> Here is links to Kmotion screen shots of X axis config and response.
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/329027615/view?picmode=&mode=tn&order=ordinal&start=1&count=20&dir=asc
>
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/329027615/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
>
>
> Sorry about all these dum questions. :)
> Thanks,
> Troy
Group: DynoMotion Message: 1091 From: Tom Kerekes Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
ok good.  So for your system:
 
15000 microsteps per inch
5080 encoder counts per inch
 
InputGain0 factor should be 2.95276 to match them.
 
Yes the small errors are probably mechanical.  Actually we are in a perfect position to test the benefits of running closed loop.  Please run some plots similar to what you did before but with the new more exact factor and also push the Zero button before the motion so the microsteps command and the measured encoder both start off from the same value (zero).  The plots should match very closely, possibly so closely it is hard to distinguish them.  You can then zoom in by left-click dragging with the mouse.  Or switch to displaying Position Error, Output vs Time.  This error will represent the positioning error of your system due to mechanical compliance, stepper motor error, backlash, leadscrew errors, etc.. as measured by your glass scales.
 
Next switch to CL Step (closed loop stepper output mode), PID settings, and low pass filter as described here:
 
 
Then repeat the same plots showing (hopefully) great improvement.
 
Regards
TK
 
 

Group: DynoMotion Message: 1092 From: tmday7 Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok. I was close than using the eye i got 2.95 :)
I configured CL Step,still on Xaxis, here is pics of Step Response screen.How does it look?
I set the Filter to what is described in document.

http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/985986324/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc

http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/1813217482/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc

http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/985986324/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc

With current settings there is a VERY slight dither at end of travel in both directions when coming to stop.
Let me know what i might need to adjust.

And for feedrate, how do figure what the Inches Per Minute that the axis in traveling?

Thanks,
Troy

--- Tom Kerekes wrote:
>
> ok good.  So for your system:
>
> 15000 microsteps per inch
> 5080 encoder counts per inch
>
> InputGain0 factor should be 2.95276 to match them.
>
> Yes the small errors are probably mechanical.  Actually we are in a perfect
> position to test the benefits of running closed loop.  Please run some plots
> similar to what you did before but with the new more exact factor and also push
> the Zero button before the motion so the microsteps command and the measured
> encoder both start off from the same value (zero).  The plots should match very
> closely, possibly so closely it is hard to distinguish them.  You can then zoom
> in by left-click dragging with the mouse.  Or switch to displaying Position
> Error, Output vs Time.  This error will represent the positioning error of your
> system due to mechanical compliance, stepper motor error, backlash, leadscrew
> errors, etc.. as measured by your glass scales.
>
> Next switch to CL Step (closed loop stepper output mode), PID settings, and low
> pass filter as described here:
>
> http://www.dynomotion.com/Help/ClosedLoopStep/ClosedLoopStepper.htm
>
>
> Then repeat the same plots showing (hopefully) great improvement.
>
> Regards
> TK
>
>
Group: DynoMotion Message: 1093 From: Tom Kerekes Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Very good.  I see you uploaded one more plot for closed loop errors where you didn't include a link.
 

The units are all in microsteps - 15,000 microsteps per inch or 1 mil would be 15 on the left Y axis.
 
The move size of 15000 at 45000 usteps/sec is a 1 inch move at 3 inches per second (180ipm).
 
Open loop the error has a range of about 6 mils during the motion and after moving back to the same spot is off by 1.1 mils
 
Closed loop the error has a range of about 3 mils during the motion and has no error after stopping.
 
I don't really understand what "dither" you are referring to.  I don't really see it in the plots.  What it might be is that it looks like you have about 1 mil of backlash in your system which can cause the motor to "hunt" or dither back and forth the backlash amount trying to hold zero error at the encoder.  If this is bothersome you can use the Deadband settings.  This basically causes the servo to stop when it gets close to zero error rather than driving all the way to zero and possibly overshooting slightly.  This will increase the system error slightly but may stop the "dithering".  Try a Deadband range of 10 gain 0 to see if it helps.
 
Thanks
TK
 

Group: DynoMotion Message: 1094 From: tmday7 Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Here is Deadband added to X axis and YandZ also with Closed Loop.And i slowed down to 140i.p.m. 180 little to fast for machine this little.:) 140 maybe also. ;)

http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/322538044/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc

A couple more things...What wood be a good Max Follow Error for my setup , by looking at the Step Response results?

And on Y and Z i had to make the InputGain to minus.(-2.95276) If i remember right, this is because of ball screws not being Left Handed?

If all looks good, whats next? Ready to Config Mach3 now?
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Very good.  I see you uploaded one more plot for closed loop errors where you
> didn't include a link.
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/827240163/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
>
>
> The units are all in microsteps - 15,000 microsteps per inch or 1 mil would be
> 15 on the left Y axis.
>
> The move size of 15000 at 45000 usteps/sec is a 1 inch move at 3 inches per
> second (180ipm).
>
> Open loop the error has a range of about 6 mils during the motion and after
> moving back to the same spot is off by 1.1 mils
>
> Closed loop the error has a range of about 3 mils during the motion and has no
> error after stopping.
>
> I don't really understand what "dither" you are referring to.  I don't really
> see it in the plots.  What it might be is that it looks like you have about 1
> mil of backlash in your system which can cause the motor to "hunt" or dither
> back and forth the backlash amount trying to hold zero error at the encoder.  If
> this is bothersome you can use the Deadband settings.  This basically causes the
> servo to stop when it gets close to zero error rather than driving all the way
> to zero and possibly overshooting slightly.  This will increase the system error
> slightly but may stop the "dithering".  Try a Deadband range of 10 gain 0 to see
> if it helps.
>
> Thanks
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, May 4, 2011 3:15:31 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Ok. I was close than using the eye i got 2.95 :)
> I configured CL Step,still on Xaxis, here is pics of Step Response screen.How
> does it look?
>
> I set the Filter to what is described in document.
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/985986324/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
>
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/1813217482/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
>
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/985986324/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
>
>
> With current settings there is a VERY slight dither at end of travel in both
> directions when coming to stop.
> Let me know what i might need to adjust.
>
> And for feedrate, how do figure what the Inches Per Minute that the axis in
> traveling?
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1095 From: Tom Kerekes Date: 5/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Max error I saw was around 50 so I'd set the Max following error to 200.
 
The next step would be to make a Configuration and Initialization C program for your System.
 
See Step #4 here:
 

This flash video may help understand the process:
 
 
Regards
TK
 
 
 

Group: DynoMotion Message: 1096 From: tmday7 Date: 5/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok. Got init program working with a couple issues. I copied the Mach CL PMDX and inserted my own motor configs.

http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

1) When i hit the Zero button in Mach, the Encoder DRO does not zero until i go to Kmotion and hit the zero button there. The VB is correct in the Mach3 Zero button.

2) When i do a .001" incremental step move the axis appears to be overshooting.(dithering)

3) My Z axis needs to be reversed. When i jog in + direction axis actually moves in minus direction.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Max error I saw was around 50 so I'd set the Max following error to 200.
>
> The next step would be to make a Configuration and Initialization C program for
> your System.
>
> See Step #4 here:
>
> http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
>
> This flash video may help understand the process:
>
> http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
>
> Regards
> TK
>

> From: tmday7 <tmday@...>

>
>  
> Here is Deadband added to X axis and YandZ also with Closed Loop.And i slowed
> down to 140i.p.m. 180 little to fast for machine this little.:) 140 maybe also.
> ;)
>
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/322538044/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
>
>
> A couple more things...What wood be a good Max Follow Error for my setup , by
> looking at the Step Response results?
>
> And on Y and Z i had to make the InputGain to minus.(-2.95276) If i remember
> right, this is because of ball screws not being Left Handed?
>
> If all looks good, whats next? Ready to Config Mach3 now?
> Thanks,
> Troy
>
Group: DynoMotion Message: 1097 From: tmday7 Date: 5/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.

--- "tmday7" wrote:
>
> Ok. Got init program working with a couple issues. I copied the Mach CL PMDX and inserted my own motor configs.
>
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> 1) When i hit the Zero button in Mach, the Encoder DRO does not zero until i go to Kmotion and hit the zero button there. The VB is correct in the Mach3 Zero button.
>
> 2) When i do a .001" incremental step move the axis appears to be overshooting.(dithering)
>
> 3) My Z axis needs to be reversed. When i jog in + direction axis actually moves in minus direction.
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Max error I saw was around 50 so I'd set the Max following error to 200.
> >
> > The next step would be to make a Configuration and Initialization C program for
> > your System.
> >
> > See Step #4 here:
> >
> > http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
> >
> > This flash video may help understand the process:
> >
> > http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
> >
> > Regards
> > TK
> >
>
> > From: tmday7 <tmday@>
>
> >
> >  
> > Here is Deadband added to X axis and YandZ also with Closed Loop.And i slowed
> > down to 140i.p.m. 180 little to fast for machine this little.:) 140 maybe also.
> > ;)
> >
> > http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/322538044/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
> >
> >
> > A couple more things...What wood be a good Max Follow Error for my setup , by
> > looking at the Step Response results?
> >
> > And on Y and Z i had to make the InputGain to minus.(-2.95276) If i remember
> > right, this is because of ball screws not being Left Handed?
> >
> > If all looks good, whats next? Ready to Config Mach3 now?
> > Thanks,
> > Troy
> >
>
Group: DynoMotion Message: 1099 From: Tom Kerekes Date: 5/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Regarding:
 
#1 - Check the KMotion Console.  When you push the Zero X button is the Message 10100 printed?  Also check that the Dynomotion Plugin Configuratio is set to pass Code in Variable 6 like the C program expects,
 
#2 - Still not sure what you mean here.  It may be if your mechanics have 1 mil of backlash it may be difficult to hold position without the motor dithering back and forth 1 mil.  Make a move size of 1 mil (15 microsteps) on the Step Response Screen.  Can you see the "dither" there in either the commanded microsteps or the measured table position?
 
#3 To reverse the direction of a closed loop servo reverse the sign of both the OutputGain and InputGain0 parameters.
 
Regards
TK

Group: DynoMotion Message: 1100 From: tmday7 Date: 5/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
1) Yes it prints out.
MachPlugin is set to Thread4 Variable6. But Encoder DRO in Mach3 still doesnt zero.

2)When Step 15 with Kmotion i dont see dithering or overshooting.After this i adjusted the deadband a little higher and it made it better.
I probally just need to keep adjusting PID and deadband till i find a good "middle of the road" config?

3)Tried both Input Gain and OutputGain at minus, but it kept faulting out. Then i made OutputGain minus and InputGain plus.Now Zaxis moves in right direction.

Thanks,
Troy
--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Regarding:
>
> #1 - Check the KMotion Console.  When you push the Zero X button is the Message
> 10100 printed?  Also check that the Dynomotion Plugin Configuratio is set to
> pass Code in Variable 6 like the C program expects,
>
> #2 - Still not sure what you mean here.  It may be if your mechanics have 1 mil
> of backlash it may be difficult to hold position without the motor dithering
> back and forth 1 mil.  Make a move size of 1 mil (15 microsteps) on the Step
> Response Screen.  Can you see the "dither" there in either the commanded
> microsteps or the measured table position?
>
> #3 To reverse the direction of a closed loop servo reverse the sign of both the
> OutputGain and InputGain0 parameters.
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, May 5, 2011 8:19:35 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.
>
> --- "tmday7" wrote:
> >
> > Ok. Got init program working with a couple issues. I copied the Mach CL PMDX
> >and inserted my own motor configs.
> >
> > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> >
> > 1) When i hit the Zero button in Mach, the Encoder DRO does not zero until i go
> >to Kmotion and hit the zero button there. The VB is correct in the Mach3 Zero
> >button.
> >
> > 2) When i do a .001" incremental step move the axis appears to be
> >overshooting.(dithering)
> >
> > 3) My Z axis needs to be reversed. When i jog in + direction axis actually
> >moves in minus direction.
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Max error I saw was around 50 so I'd set the Max following error to 200.
> > >
> > > The next step would be to make a Configuration and Initialization C program
> >for
> >
> > > your System.
> > >
> > > See Step #4 here:
> > >
> > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
> > >
> > > This flash video may help understand the process:
> > >
> > > http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
> > >
> > > Regards
> > > TK
> > >
> >
> > > From: tmday7 <tmday@>
> >
> > >
> > >  
> > > Here is Deadband added to X axis and YandZ also with Closed Loop.And i slowed
> >
> > > down to 140i.p.m. 180 little to fast for machine this little.:) 140 maybe
> >also.
> >
> > > ;)
> > >
> > >
> >http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/322538044/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
> >
> > >
> > >
> > > A couple more things...What wood be a good Max Follow Error for my setup , by
> >
> > > looking at the Step Response results?
> > >
> > > And on Y and Z i had to make the InputGain to minus.(-2.95276) If i remember
>
> > > right, this is because of ball screws not being Left Handed?
> > >
> > > If all looks good, whats next? Ready to Config Mach3 now?
> > > Thanks,
> > > Troy
> > >
> >
>
Group: DynoMotion Message: 1101 From: Tom Kerekes Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Regarding the Zero Button: what should happen is that the Commanded Dest in KFLOP should change to exactly match the Currently Measured Glass Scale Position.  Verify this is actually happening on the KFLOP Axis Screen.
 
Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the Encoder DROs) read Zero.  Is this happening?
 
In Mach3 Ports & Pins - Encoder/MPG - the Encoder Resolution counts/unit should be set to the same value as your Motor Tuning Resolution "Steps Per" which in your case is 15000.  Do you have this set properly?
 
Regards
TK

Group: DynoMotion Message: 1102 From: tmday7 Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Pressing Zero button in Mach does not change anything in Kmotion. If i click the Reset in Mach then the Command and Encoder in Kmotion match each other.

"Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the Encoder DROs) read Zero.Is this happening?"
Yes thats whats happening, the Command Position Zeros but not the Encoder Reading.

"....set to the same value as your Motor Tuning Resolution "Steps Per" which in your case is 15000.Do you have this set properly?
Yup, both set to 15000

As for dithering(or overshooting) i got that adjusted out with the I and Deadband Setting.All is good there now.

Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Regarding the Zero Button: what should happen is that the Commanded Dest in
> KFLOP should change to exactly match the Currently Measured Glass Scale
> Position.  Verify this is actually happening on the KFLOP Axis Screen.
>
> Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the
> Encoder DROs) read Zero.  Is this happening?
>
> In Mach3 Ports & Pins - Encoder/MPG - the Encoder Resolution counts/unit should
> be set to the same value as your Motor Tuning Resolution "Steps Per" which in
> your case is 15000.  Do you have this set properly?
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, May 5, 2011 5:37:26 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> 1) Yes it prints out.
> MachPlugin is set to Thread4 Variable6. But Encoder DRO in Mach3 still doesnt
> zero.
>
> 2)When Step 15 with Kmotion i dont see dithering or overshooting.After this i
> adjusted the deadband a little higher and it made it better.
>
> I probally just need to keep adjusting PID and deadband till i find a good
> "middle of the road" config?
>
> 3)Tried both Input Gain and OutputGain at minus, but it kept faulting out. Then
> i made OutputGain minus and InputGain plus.Now Zaxis moves in right direction.
>
> Thanks,
> Troy
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Regarding:
> >
> > #1 - Check the KMotion Console.  When you push the Zero X button is the
> >Message
> >
> > 10100 printed?  Also check that the Dynomotion Plugin Configuratio is set to
> > pass Code in Variable 6 like the C program expects,
> >
> > #2 - Still not sure what you mean here.  It may be if your mechanics have 1
> >mil
> >
> > of backlash it may be difficult to hold position without the motor dithering
> > back and forth 1 mil.  Make a move size of 1 mil (15 microsteps) on the Step
> > Response Screen.  Can you see the "dither" there in either the commanded
> > microsteps or the measured table position?
> >
> > #3 To reverse the direction of a closed loop servo reverse the sign of both the
> >
> > OutputGain and InputGain0 parameters.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, May 5, 2011 8:19:35 AM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.
> >
> > --- "tmday7" wrote:
> > >
> > > Ok. Got init program working with a couple issues. I copied the Mach CL PMDX
>
> > >and inserted my own motor configs.
> > >
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > 1) When i hit the Zero button in Mach, the Encoder DRO does not zero until i
> >go
> >
> > >to Kmotion and hit the zero button there. The VB is correct in the Mach3 Zero
>
> > >button.
> > >
> > > 2) When i do a .001" incremental step move the axis appears to be
> > >overshooting.(dithering)
> > >
> > > 3) My Z axis needs to be reversed. When i jog in + direction axis actually
> > >moves in minus direction.
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Max error I saw was around 50 so I'd set the Max following error to 200.
> > > >
> > > > The next step would be to make a Configuration and Initialization C program
> >
> > >for
> > >
> > > > your System.
> > > >
> > > > See Step #4 here:
> > > >
> > > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
> > > >
> > > > This flash video may help understand the process:
> > > >
> > > > http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
> > > >
> > > > Regards
> > > > TK
> > > >
> > >
> > > > From: tmday7 <tmday@>
> > >
> > > >
> > > >  
> > > > Here is Deadband added to X axis and YandZ also with Closed Loop.And i
> >slowed
> >
> > >
> > > > down to 140i.p.m. 180 little to fast for machine this little.:) 140 maybe
> > >also.
> > >
> > > > ;)
> > > >
> > > >
> >>http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/322538044/view?picmode=large&mode=tn&order=ordinal&start=1&dir=asc
> >c
> > >
> > > >
> > > >
> > > > A couple more things...What wood be a good Max Follow Error for my setup ,
> >by
> >
> > >
> > > > looking at the Step Response results?
> > > >
> > > > And on Y and Z i had to make the InputGain to minus.(-2.95276) If i
> >remember
> >
> >
> > > > right, this is because of ball screws not being Left Handed?
> > > >
> > > > If all looks good, whats next? Ready to Config Mach3 now?
> > > > Thanks,
> > > > Troy
> > > >
> > >
> >
>
Group: DynoMotion Message: 1103 From: Tom Kerekes Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Strange.  You didn't explicitly state that the printed message in the console showed 10100.  What are the axis screen values showing?  What does the Encoder DRO show?
 
Please add the 2 diagnostic print statements below into the NotifyZeroEncoderMach3Diag.c and report what is printed on the Console when you push the Zero X button.
 
Thanks
TK
 
 if (msg==10100)
 {
     // adjust the commanded position to match the glass scale encoder
     DisableAxis(X);
     printf("Before: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
     EnableAxisDest(X,chan[X].Position);
     printf("After: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
 }


Group: DynoMotion Message: 1104 From: tmday7 Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Sorry didnt pay attention to printout. Here is printout with the 2 diagnostic print statements added.

The first 2 are without moving encoder and hitting the Reset button in Mach, and last one i moved Encoder only and not command.


Mach3 Notify Call, Message = 10100
Before: Pos=310.039798 Dest=310.039798
After: Pos=310.039798 Dest=310.039798
Following Error Disabled Axis:0
Feed Hold on
Simulated EStop off
Z Enabled
Simulated Manual Mode off
Pulse Estop

Mach3 Notify Call, Message = 10100
Before: Pos=-1054.135313 Dest=-1054.135313
After: Pos=-1054.135313 Dest=-1054.135313
Following Error Disabled Axis:0
Feed Hold on
Simulated EStop off
Z Enabled
Simulated Manual Mode off
Pulse Estop

Mach3 Notify Call, Message = 10100
Before: Pos=-912.402834 Dest=-1116.143273
After: Pos=-912.402834 Dest=-912.402834


Thanks,
Troy




--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Strange.  You didn't explicitly state that the printed message in the console
> showed 10100.  What are the axis screen values showing?  What does the Encoder
> DRO show?
>
> Please add the 2 diagnostic print statements below into the
> NotifyZeroEncoderMach3Diag.c and report what is printed on the Console when you
> push the Zero X button.
>
> Thanks
> TK
>
>  if (msg==10100)
>  {
>      // adjust the commanded position to match the glass scale encoder
>      DisableAxis(X);
>      printf("Before: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
>      EnableAxisDest(X,chan[X].Position);
>      printf("After: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
>  }
>
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 6, 2011 1:23:33 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Pressing Zero button in Mach does not change anything in Kmotion. If i click the
> Reset in Mach then the Command and Encoder in Kmotion match each other.
>
> "Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the
> Encoder DROs) read Zero.Is this happening?"
> Yes thats whats happening, the Command Position Zeros but not the Encoder
> Reading.
>
> "....set to the same value as your Motor Tuning Resolution "Steps Per" which in
> your case is 15000.Do you have this set properly?
> Yup, both set to 15000
>
> As for dithering(or overshooting) i got that adjusted out with the I and
> Deadband Setting.All is good there now.
>
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Regarding the Zero Button: what should happen is that the Commanded Dest in
> > KFLOP should change to exactly match the Currently Measured Glass Scale
> > Position.  Verify this is actually happening on the KFLOP Axis Screen.
> >
> > Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the
>
> > Encoder DROs) read Zero.  Is this happening?
> >
> > In Mach3 Ports & Pins - Encoder/MPG - the Encoder Resolution counts/unit should
> >
> > be set to the same value as your Motor Tuning Resolution "Steps Per" which in
> > your case is 15000.  Do you have this set properly?
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, May 5, 2011 5:37:26 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > 1) Yes it prints out.
> > MachPlugin is set to Thread4 Variable6. But Encoder DRO in Mach3 still doesnt
> > zero.
> >
> > 2)When Step 15 with Kmotion i dont see dithering or overshooting.After this i
> > adjusted the deadband a little higher and it made it better.
> >
> > I probally just need to keep adjusting PID and deadband till i find a good
> > "middle of the road" config?
> >
> > 3)Tried both Input Gain and OutputGain at minus, but it kept faulting out. Then
> >
> > i made OutputGain minus and InputGain plus.Now Zaxis moves in right direction.
> >
> > Thanks,
> > Troy
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Regarding:
> > >
> > > #1 - Check the KMotion Console.  When you push the Zero X button is the
> > >Message
> > >
> > > 10100 printed?  Also check that the Dynomotion Plugin Configuratio is set
> >to
> >
> > > pass Code in Variable 6 like the C program expects,
> > >
> > > #2 - Still not sure what you mean here.  It may be if your mechanics have
> >1
> >
> > >mil
> > >
> > > of backlash it may be difficult to hold position without the motor dithering
>
> > > back and forth 1 mil.  Make a move size of 1 mil (15 microsteps) on the
> >Step
> >
> > > Response Screen.  Can you see the "dither" there in either the commanded
> > > microsteps or the measured table position?
> > >
> > > #3 To reverse the direction of a closed loop servo reverse the sign of both
> >the
> >
> > >
> > > OutputGain and InputGain0 parameters.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thu, May 5, 2011 8:19:35 AM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.
> > >
> > > --- "tmday7" wrote:
> > > >
> > > > Ok. Got init program working with a couple issues. I copied the Mach CL
> >PMDX
> >
> >
> > > >and inserted my own motor configs.
> > > >
> > > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > >
> > > > 1) When i hit the Zero button in Mach, the Encoder DRO does not zero until
> >i
> >
> > >go
> > >
> > > >to Kmotion and hit the zero button there. The VB is correct in the Mach3
> >Zero
> >
> >
> > > >button.
> > > >
> > > > 2) When i do a .001" incremental step move the axis appears to be
> > > >overshooting.(dithering)
> > > >
> > > > 3) My Z axis needs to be reversed. When i jog in + direction axis actually
>
> > > >moves in minus direction.
> > > >
> > > > Thanks,
> > > > Troy
> > > >
Group: DynoMotion Message: 1105 From: tmday7 Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
(EDITED FROM PREVIOUS POST)
Sorry didnt pay attention to printout. Here is printout with the 2 diagnostic print statements added.

The first 2 I moved axis manualy,(turned screw by hand) which caused Mach to go into Reset, then i clicked Reset in Mach followed by Zero button in Mach.

And the last one i manually moved Encoder again, except not enough to throw Mach into Reset this time.Then clicked the Zero Button in Mach

> Mach3 Notify Call, Message = 10100
> Before: Pos=310.039798 Dest=310.039798
> After: Pos=310.039798 Dest=310.039798
> Following Error Disabled Axis:0
> Feed Hold on
> Simulated EStop off
> Z Enabled
> Simulated Manual Mode off
> Pulse Estop
>
> Mach3 Notify Call, Message = 10100
> Before: Pos=-1054.135313 Dest=-1054.135313
> After: Pos=-1054.135313 Dest=-1054.135313
> Following Error Disabled Axis:0
> Feed Hold on
> Simulated EStop off
> Z Enabled
> Simulated Manual Mode off
> Pulse Estop
>
> Mach3 Notify Call, Message = 10100
> Before: Pos=-912.402834 Dest=-1116.143273
> After: Pos=-912.402834 Dest=-912.402834
>
>
> Thanks,
> Troy
>
>
>
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Strange.  You didn't explicitly state that the printed message in the console
> > showed 10100.  What are the axis screen values showing?  What does the Encoder
> > DRO show?
> >
> > Please add the 2 diagnostic print statements below into the
> > NotifyZeroEncoderMach3Diag.c and report what is printed on the Console when you
> > push the Zero X button.
> >
> > Thanks
> > TK
> >
> >  if (msg==10100)
> >  {
> >      // adjust the commanded position to match the glass scale encoder
> >      DisableAxis(X);
> >      printf("Before: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
> >      EnableAxisDest(X,chan[X].Position);
> >      printf("After: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
> >  }
> >
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 6, 2011 1:23:33 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Pressing Zero button in Mach does not change anything in Kmotion. If i click the
> > Reset in Mach then the Command and Encoder in Kmotion match each other.
> >
> > "Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the
> > Encoder DROs) read Zero.Is this happening?"
> > Yes thats whats happening, the Command Position Zeros but not the Encoder
> > Reading.
> >
> > "....set to the same value as your Motor Tuning Resolution "Steps Per" which in
> > your case is 15000.Do you have this set properly?
> > Yup, both set to 15000
> >
> > As for dithering(or overshooting) i got that adjusted out with the I and
> > Deadband Setting.All is good there now.
> >
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Regarding the Zero Button: what should happen is that the Commanded Dest in
> > > KFLOP should change to exactly match the Currently Measured Glass Scale
> > > Position.  Verify this is actually happening on the KFLOP Axis Screen.
> > >
> > > Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the
> >
> > > Encoder DROs) read Zero.  Is this happening?
> > >
> > > In Mach3 Ports & Pins - Encoder/MPG - the Encoder Resolution counts/unit should
> > >
> > > be set to the same value as your Motor Tuning Resolution "Steps Per" which in
> > > your case is 15000.  Do you have this set properly?
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thu, May 5, 2011 5:37:26 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > 1) Yes it prints out.
> > > MachPlugin is set to Thread4 Variable6. But Encoder DRO in Mach3 still doesnt
> > > zero.
> > >
> > > 2)When Step 15 with Kmotion i dont see dithering or overshooting.After this i
> > > adjusted the deadband a little higher and it made it better.
> > >
> > > I probally just need to keep adjusting PID and deadband till i find a good
> > > "middle of the road" config?
> > >
> > > 3)Tried both Input Gain and OutputGain at minus, but it kept faulting out. Then
> > >
> > > i made OutputGain minus and InputGain plus.Now Zaxis moves in right direction.
> > >
> > > Thanks,
> > > Troy
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Regarding:
> > > >
> > > > #1 - Check the KMotion Console.  When you push the Zero X button is the
> > > >Message
> > > >
> > > > 10100 printed?  Also check that the Dynomotion Plugin Configuratio is set
> > >to
> > >
> > > > pass Code in Variable 6 like the C program expects,
> > > >
> > > > #2 - Still not sure what you mean here.  It may be if your mechanics have
> > >1
> > >
> > > >mil
> > > >
> > > > of backlash it may be difficult to hold position without the motor dithering
> >
> > > > back and forth 1 mil.  Make a move size of 1 mil (15 microsteps) on the
> > >Step
> > >
> > > > Response Screen.  Can you see the "dither" there in either the commanded
> > > > microsteps or the measured table position?
> > > >
> > > > #3 To reverse the direction of a closed loop servo reverse the sign of both
> > >the
> > >
> > > >
> > > > OutputGain and InputGain0 parameters.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 5, 2011 8:19:35 AM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.
> > > >
> > > > --- "tmday7" wrote:
> > > > >
> > > > > Ok. Got init program working with a couple issues. I copied the Mach CL
> > >PMDX
> > >
> > >
> > > > >and inserted my own motor configs.
> > > > >
> > > > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > >
> > > > > 1) When i hit the Zero button in Mach, the Encoder DRO does not zero until
> > >i
> > >
> > > >go
> > > >
> > > > >to Kmotion and hit the zero button there. The VB is correct in the Mach3
> > >Zero
> > >
> > >
> > > > >button.
> > > > >
> > > > > 2) When i do a .001" incremental step move the axis appears to be
> > > > >overshooting.(dithering)
> > > > >
> > > > > 3) My Z axis needs to be reversed. When i jog in + direction axis actually
> >
> > > > >moves in minus direction.
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
>
Group: DynoMotion Message: 1106 From: Tom Kerekes Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Strange it seems to be working.  The Dest is changed to match the Position (-912.402834).  But I assume the Mach3 Encoder DRO still is not Zero?  Your X axis is axis channel 0 correct?
 
You didn't answer my other questions.  I'll repeat:
 
What are the axis screen values showing?  What does the Encoder DRO show?  What does the Command DRO show?
TK

Group: DynoMotion Message: 1107 From: tmday7 Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Yes X axis is 0. Correct Mach3 DRO does not change at all, the only time Mach encoder DRO changes is when i click the Zero button in Kmotion.

"What are the axis screen values showing? What does the Encoder DRO show? What does the Command DRO show?"

When i click Zero button in Mach the Command pos DRO in Mach zeros out as it should, but the encoder DRO in Mach does not change.

The Axis Screen values in Kmotion? They match one another just like the printout shows.

Before Zero button....Mach3 Command DRO -1.1955 Encoder -1.1951
Kmotion Command Dest -17926.43 Pos -17932.????

After Zero Button....Mach3 Command DRO 0.0000 Encoder -1.1951
Kmotion Command Dest -17932.???? Pos -17932.????

Printout
Before: Pos -17932.???? Dest: -17926.????
After : Pos -17932.???? Dest: -17932.????

I truncated after the . Sorry, running back and forth, machine is in another building about 200 feet away. :) No internet there yet.

Troy


--- Tom Kerekes wrote:
>
> Strange it seems to be working.  The Dest is changed to match the Position
> (-912.402834).  But I assume the Mach3 Encoder DRO still is not Zero?  Your X
> axis is axis channel 0 correct?
>
> You didn't answer my other questions.  I'll repeat:
>
> What are the axis screen values showing?  What does the Encoder DRO show?  What
> does the Command DRO show?
>
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 6, 2011 2:17:26 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Sorry didnt pay attention to printout. Here is printout with the 2 diagnostic
> print statements added.
>
> The first 2 are without moving encoder and hitting the Reset button in Mach, and
> last one i moved Encoder only and not command.
>
> Mach3 Notify Call, Message = 10100
> Before: Pos=310.039798 Dest=310.039798
> After: Pos=310.039798 Dest=310.039798
> Following Error Disabled Axis:0
> Feed Hold on
> Simulated EStop off
> Z Enabled
> Simulated Manual Mode off
> Pulse Estop
>
> Mach3 Notify Call, Message = 10100
> Before: Pos=-1054.135313 Dest=-1054.135313
> After: Pos=-1054.135313 Dest=-1054.135313
> Following Error Disabled Axis:0
> Feed Hold on
> Simulated EStop off
> Z Enabled
> Simulated Manual Mode off
> Pulse Estop
>
> Mach3 Notify Call, Message = 10100
> Before: Pos=-912.402834 Dest=-1116.143273
> After: Pos=-912.402834 Dest=-912.402834
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Strange.  You didn't explicitly state that the printed message in the console
>
> > showed 10100.  What are the axis screen values showing?  What does the
> >Encoder
> >
> > DRO show?
> >
> > Please add the 2 diagnostic print statements below into the
> > NotifyZeroEncoderMach3Diag.c and report what is printed on the Console when you
> >
> > push the Zero X button.
> >
> > Thanks
> > TK
> >
> >  if (msg==10100)
> >  {
> >      // adjust the commanded position to match the glass scale encoder
> >      DisableAxis(X);
> >      printf("Before: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
> >      EnableAxisDest(X,chan[X].Position);
> >      printf("After: Pos=%f Dest=%f\n",chan[X].Position,chan[X].Dest);
> >  }
> >
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 6, 2011 1:23:33 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Pressing Zero button in Mach does not change anything in Kmotion. If i click
> >the
> >
> > Reset in Mach then the Command and Encoder in Kmotion match each other.
> >
> > "Then Mach3 computes a new Work Offset such to make the Commanded DROs (not the
> >
> > Encoder DROs) read Zero.Is this happening?"
> > Yes thats whats happening, the Command Position Zeros but not the Encoder
> > Reading.
> >
> > "....set to the same value as your Motor Tuning Resolution "Steps Per" which in
> >
> > your case is 15000.Do you have this set properly?
> > Yup, both set to 15000
> >
> > As for dithering(or overshooting) i got that adjusted out with the I and
> > Deadband Setting.All is good there now.
> >
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Regarding the Zero Button: what should happen is that the Commanded Dest in
> > > KFLOP should change to exactly match the Currently Measured Glass Scale
> > > Position.  Verify this is actually happening on the KFLOP Axis Screen.
> > >
> > > Then Mach3 computes a new Work Offset such to make the Commanded DROs (not
> >the
> >
> >
> > > Encoder DROs) read Zero.  Is this happening?
> > >
> > > In Mach3 Ports & Pins - Encoder/MPG - the Encoder Resolution counts/unit
> >should
> >
> > >
> > > be set to the same value as your Motor Tuning Resolution "Steps Per" which in
> >
> > > your case is 15000.  Do you have this set properly?
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thu, May 5, 2011 5:37:26 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > 1) Yes it prints out.
> > > MachPlugin is set to Thread4 Variable6. But Encoder DRO in Mach3 still doesnt
> >
> > > zero.
> > >
> > > 2)When Step 15 with Kmotion i dont see dithering or overshooting.After this i
> >
> > > adjusted the deadband a little higher and it made it better.
> > >
> > > I probally just need to keep adjusting PID and deadband till i find a good
> > > "middle of the road" config?
> > >
> > > 3)Tried both Input Gain and OutputGain at minus, but it kept faulting out.
> >Then
> >
> > >
> > > i made OutputGain minus and InputGain plus.Now Zaxis moves in right
> >direction.
> > >
> > > Thanks,
> > > Troy
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Regarding:
> > > >
> > > > #1 - Check the KMotion Console.ÃÆ'‚  When you push the Zero X button is
> >the
> >
> > > >Message
> > > >
> > > > 10100 printed?ÃÆ'‚  Also check that the Dynomotion Plugin Configuratio
> >is set
> >
> > >to
> > >
> > > > pass Code in Variable 6 like the C program expects,
> > > >
> > > > #2 - Still not sure what you mean here.ÃÆ'‚  It may be if your
> >mechanics have
> >
> > >1
> > >
> > > >mil
> > > >
> > > > of backlash it may be difficult to hold position without the motor
> >dithering
> >
> >
> > > > back and forth 1 mil.ÃÆ'‚  Make a move size of 1 mil (15 microsteps) on
> >the
> >
> > >Step
> > >
> > > > Response Screen.ÃÆ'‚  Can you see the "dither" there in either the
> >commanded
> >
> > > > microsteps or the measured table position?
> > > >
> > > > #3 To reverse the direction of a closed loop servo reverse the sign of both
> >
> > >the
> > >
> > > >
> > > > OutputGain and InputGain0 parameters.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 5, 2011 8:19:35 AM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÃÆ'‚ 
> > > > Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.
> > > >
> > > > --- "tmday7" wrote:
> > > > >
> > > > > Ok. Got init program working with a couple issues. I copied the Mach CL
> > >PMDX
> > >
> > >
> > > > >and inserted my own motor configs.
> > > > >
> > > > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > >
> > > > > 1) When i hit the Zero button in Mach, the Encoder DRO does not zero
> >until
> >
> > >i
> > >
> > > >go
> > > >
> > > > >to Kmotion and hit the zero button there. The VB is correct in the Mach3
> > >Zero
> > >
> > >
> > > > >button.
> > > > >
> > > > > 2) When i do a .001" incremental step move the axis appears to be
> > > > >overshooting.(dithering)
> > > > >
> > > > > 3) My Z axis needs to be reversed. When i jog in + direction axis
> >actually
> >
> >
> > > > >moves in minus direction.
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
>
Group: DynoMotion Message: 1108 From: Tom Kerekes Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
I remember having this problem a while back, but don't remember how it was resolved.
 
I think the issue is your Mach3 Encoder DROs are displaying Machine Coordinates rather than Work Coordinates.
 
If in Mach3 you go to the offsets Screen and change the Current Work Offset X does both the Command DROs and Encoder DROs change by the amount of change?
 
I just tried it on my Mach3 Version 3.042.038 and both change.  I'm also using the standard Mach3Mill Screens.
 
Regards
TK
 

 

Group: DynoMotion Message: 1109 From: tmday7 Date: 5/6/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Thats it :) Update to latest Mach3 lockdown fixed it. I was running 3.041

Now onto next :) when we did the TriOnics we could flip a manual switch and use machine mill manualy without throwing Mach into Reset, or did it put Mach into Reset? I dont remember.

I just tried it and while Mach is in Reset i could not zero any axis. BUT, i dont have my manual switch wired into Kflop, it just disables the Gecko drives.

Thanks again,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> I remember having this problem a while back, but don't remember how it was
> resolved.
>
> I think the issue is your Mach3 Encoder DROs are displaying Machine Coordinates
> rather than Work Coordinates.
>
> If in Mach3 you go to the offsets Screen and change the Current Work Offset X
> does both the Command DROs and Encoder DROs change by the amount of change?
>
> I just tried it on my Mach3 Version 3.042.038 and both change.  I'm also using
> the standard Mach3Mill Screens.
>
> Regards
> TK
>
>
>  
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 6, 2011 3:05:58 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Yes X axis is 0. Correct Mach3 DRO does not change at all, the only time Mach
> encoder DRO changes is when i click the Zero button in Kmotion.
>
> "What are the axis screen values showing? What does the Encoder DRO show? What
> does the Command DRO show?"
>
> When i click Zero button in Mach the Command pos DRO in Mach zeros out as it
> should, but the encoder DRO in Mach does not change.
>
> The Axis Screen values in Kmotion? They match one another just like the printout
> shows.
>
> Before Zero button....Mach3 Command DRO -1.1955 Encoder -1.1951
> Kmotion Command Dest -17926.43 Pos -17932.????
>
> After Zero Button....Mach3 Command DRO 0.0000 Encoder -1.1951
> Kmotion Command Dest -17932.???? Pos -17932.????
>
> Printout
> Before: Pos -17932.???? Dest: -17926.????
> After : Pos -17932.???? Dest: -17932.????
>
> I truncated after the . Sorry, running back and forth, machine is in another
> building about 200 feet away. :) No internet there yet.
>
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Strange it seems to be working.  The Dest is changed to match the Position
> > (-912.402834).  But I assume the Mach3 Encoder DRO still is not Zero?  Your X
> >
> > axis is axis channel 0 correct?
> >
> > You didn't answer my other questions.  I'll repeat:
> >
> > What are the axis screen values showing?  What does the Encoder DRO show? 
> >What
> >
> > does the Command DRO show?
> >
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 6, 2011 2:17:26 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Sorry didnt pay attention to printout. Here is printout with the 2 diagnostic
> > print statements added.
> >
> > The first 2 are without moving encoder and hitting the Reset button in Mach,
> >and
> >
> > last one i moved Encoder only and not command.
> >
> > Mach3 Notify Call, Message = 10100
> > Before: Pos=310.039798 Dest=310.039798
> > After: Pos=310.039798 Dest=310.039798
> > Following Error Disabled Axis:0
> > Feed Hold on
> > Simulated EStop off
> > Z Enabled
> > Simulated Manual Mode off
> > Pulse Estop
> >
> > Mach3 Notify Call, Message = 10100
> > Before: Pos=-1054.135313 Dest=-1054.135313
> > After: Pos=-1054.135313 Dest=-1054.135313
> > Following Error Disabled Axis:0
> > Feed Hold on
> > Simulated EStop off
> > Z Enabled
> > Simulated Manual Mode off
> > Pulse Estop
> >
> > Mach3 Notify Call, Message = 10100
> > Before: Pos=-912.402834 Dest=-1116.143273
> > After: Pos=-912.402834 Dest=-912.402834
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Strange.  You didn't explicitly state that the printed message in the
> >console
> >
> >
> > > showed 10100.  What are the axis screen values showing?  What does the
>
> > >Encoder
> > >
> > > DRO show?
> > >
> > > Please add the 2 diagnostic print statements below into the
> > > NotifyZeroEncoderMach3Diag.c and report what is printed on the Console when
> >you
> >
> > >
> > > push the Zero X button.
> > >
> > > Thanks
> > > TK
> > >
> > >  if (msg==10100)
> > >  {
> > >      // adjust the commanded position to match the glass scale
> >encoder
> > >      DisableAxis(X);
> > >      printf("Before: Pos=%f
> >Dest=%f\n",chan[X].Position,chan[X].Dest);
> > >      EnableAxisDest(X,chan[X].Position);
> > >      printf("After: Pos=%f
> >Dest=%f\n",chan[X].Position,chan[X].Dest);
> > >  }
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Fri, May 6, 2011 1:23:33 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Pressing Zero button in Mach does not change anything in Kmotion. If i click
>
> > >the
> > >
> > > Reset in Mach then the Command and Encoder in Kmotion match each other.
> > >
> > > "Then Mach3 computes a new Work Offset such to make the Commanded DROs (not
> >the
> >
> > >
> > > Encoder DROs) read Zero.Is this happening?"
> > > Yes thats whats happening, the Command Position Zeros but not the Encoder
> > > Reading.
> > >
> > > "....set to the same value as your Motor Tuning Resolution "Steps Per" which
> >in
> >
> > >
> > > your case is 15000.Do you have this set properly?
> > > Yup, both set to 15000
> > >
> > > As for dithering(or overshooting) i got that adjusted out with the I and
> > > Deadband Setting.All is good there now.
> > >
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Regarding the Zero Button: what should happen is that the Commanded Dest in
> >
> > > > KFLOP should change to exactly match the Currently Measured Glass Scale
> > > > Position.ÃÆ'‚  Verify this is actually happening on the KFLOP Axis
> >Screen.
> > > >
> > > > Then Mach3 computes a new Work Offset such to make the Commanded DROs (not
>
> > >the
> > >
> > >
> > > > Encoder DROs) read Zero.ÃÆ'‚  Is this happening?
> > > >
> > > > In Mach3 Ports & Pins - Encoder/MPG - the Encoder Resolution counts/unit
> > >should
> > >
> > > >
> > > > be set to the same value as your Motor Tuning Resolution "Steps Per" which
> >in
> >
> > >
> > > > your case is 15000.ÃÆ'‚  Do you have this set properly?
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 5, 2011 5:37:26 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÃÆ'‚ 
> > > > 1) Yes it prints out.
> > > > MachPlugin is set to Thread4 Variable6. But Encoder DRO in Mach3 still
> >doesnt
> >
> > >
> > > > zero.
> > > >
> > > > 2)When Step 15 with Kmotion i dont see dithering or overshooting.After this
> >i
> >
> > >
> > > > adjusted the deadband a little higher and it made it better.
> > > >
> > > > I probally just need to keep adjusting PID and deadband till i find a good
>
> > > > "middle of the road" config?
> > > >
> > > > 3)Tried both Input Gain and OutputGain at minus, but it kept faulting out.
>
> > >Then
> > >
> > > >
> > > > i made OutputGain minus and InputGain plus.Now Zaxis moves in right
> > >direction.
> > > >
> > > > Thanks,
> > > > Troy
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > Regarding:
> > > > >
> > > > > #1 - Check the KMotion Console.ÃÆ'Æ'‚ÃÆ'‚  When you push the
> >Zero X button is
> >
> > >the
> > >
> > > > >Message
> > > > >
> > > > > 10100 printed?ÃÆ'Æ'‚ÃÆ'‚  Also check that the Dynomotion Plugin
> >Configuratio
> >
> > >is set
> > >
> > > >to
> > > >
> > > > > pass Code in Variable 6 like the C program expects,
> > > > >
> > > > > #2 - Still not sure what you mean here.ÃÆ'Æ'‚ÃÆ'‚  It may be if
> >your
> >
> > >mechanics have
> > >
> > > >1
> > > >
> > > > >mil
> > > > >
> > > > > of backlash it may be difficult to hold position without the motor
> > >dithering
> > >
> > >
> > > > > back and forth 1 mil.ÃÆ'Æ'‚ÃÆ'‚  Make a move size of 1 mil (15
> >microsteps) on
> >
> > >the
> > >
> > > >Step
> > > >
> > > > > Response Screen.ÃÆ'Æ'‚ÃÆ'‚  Can you see the "dither" there in
> >either the
> >
> > >commanded
> > >
> > > > > microsteps or the measured table position?
> > > > >
> > > > > #3 To reverse the direction of a closed loop servo reverse the sign of
> >both
> >
> > >
> > > >the
> > > >
> > > > >
> > > > > OutputGain and InputGain0 parameters.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thu, May 5, 2011 8:19:35 AM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Forgot to mention, iam using the NotifyZeroEncoderMach3 C program.
> > > > >
> > > > > --- "tmday7" wrote:
> > > > > >
> > > > > > Ok. Got init program working with a couple issues. I copied the Mach CL
> >
> > > >PMDX
> > > >
> > > >
> > > > > >and inserted my own motor configs.
> > > > > >
> > > > > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > > >
> > > > > > 1) When i hit the Zero button in Mach, the Encoder DRO does not zero
> > >until
> > >
> > > >i
> > > >
> > > > >go
> > > > >
> > > > > >to Kmotion and hit the zero button there. The VB is correct in the Mach3
> >
> > > >Zero
> > > >
> > > >
> > > > > >button.
> > > > > >
> > > > > > 2) When i do a .001" incremental step move the axis appears to be
> > > > > >overshooting.(dithering)
> > > > > >
> > > > > > 3) My Z axis needs to be reversed. When i jog in + direction axis
> > >actually
> > >
> > >
> > > > > >moves in minus direction.
> > > > > >
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> >
>
Group: DynoMotion Message: 1110 From: Tom Kerekes Date: 5/7/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c program is expecting to switch from Closed Loop to Open Loop and so forth.
 
I think Mach3 should NOT be in reset while in Manual mode.  I think the trick was that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that Mach3 was configured to monitor rather than the Raw Estop signal coming from the PMDX. 
 
Regards,
TK

Group: DynoMotion Message: 1111 From: tmday7 Date: 5/7/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok. I remember that now.
Ill let you know.
Thanks,
Troy

---Tom Kerekes wrote:
>
> Hi Troy,
>
> Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c
> program is expecting to switch from Closed Loop to Open Loop and so forth.
>
> I think Mach3 should NOT be in reset while in Manual mode.  I think the trick
> was that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that
> Mach3 was configured to monitor rather than the Raw Estop signal coming from the
> PMDX. 
>
>
> Regards,
> TK
>
>
>
>
> ________________________________
> From: tmday7
>
>  
> Thats it :) Update to latest Mach3 lockdown fixed it. I was running 3.041
>
> Now onto next :) when we did the TriOnics we could flip a manual switch and use
> machine mill manualy without throwing Mach into Reset, or did it put Mach into
> Reset? I dont remember.
>
> I just tried it and while Mach is in Reset i could not zero any axis. BUT, i
> dont have my manual switch wired into Kflop, it just disables the Gecko drives.
>
> Thanks again,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > I remember having this problem a while back, but don't remember how it was
> > resolved.
> >
> > I think the issue is your Mach3 Encoder DROs are displaying Machine Coordinates
> >
> > rather than Work Coordinates.
> >
> > If in Mach3 you go to the offsets Screen and change the Current Work Offset X
> > does both the Command DROs and Encoder DROs change by the amount of change?
> >
> > I just tried it on my Mach3 Version 3.042.038 and both change.  I'm also using
> >
> > the standard Mach3Mill Screens.
> >
> > Regards
> > TK
> >
> >
> >  
> >
> >
> >
Group: DynoMotion Message: 1112 From: tmday7 Date: 5/7/2011
Subject: Re: KFLOP Setup on a Mill/Drill
For temporary, can a VB button in Mach be made to do this?

Thanks,
Troy

--- "tmday7"wrote:
>
> Ok. I remember that now.
> Ill let you know.
> Thanks,
> Troy
>
> ---Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c
> > program is expecting to switch from Closed Loop to Open Loop and so forth.
> >
> > I think Mach3 should NOT be in reset while in Manual mode.  I think the trick
> > was that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that
> > Mach3 was configured to monitor rather than the Raw Estop signal coming from the
> > PMDX. 
> >
> >
> > Regards,
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7
> >
> >  
> > Thats it :) Update to latest Mach3 lockdown fixed it. I was running 3.041
> >
> > Now onto next :) when we did the TriOnics we could flip a manual switch and use
> > machine mill manualy without throwing Mach into Reset, or did it put Mach into
> > Reset? I dont remember.
> >
> > I just tried it and while Mach is in Reset i could not zero any axis. BUT, i
> > dont have my manual switch wired into Kflop, it just disables the Gecko drives.
> >
> > Thanks again,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > I remember having this problem a while back, but don't remember how it was
> > > resolved.
> > >
> > > I think the issue is your Mach3 Encoder DROs are displaying Machine Coordinates
> > >
> > > rather than Work Coordinates.
> > >
> > > If in Mach3 you go to the offsets Screen and change the Current Work Offset X
> > > does both the Command DROs and Encoder DROs change by the amount of change?
> > >
> > > I just tried it on my Mach3 Version 3.042.038 and both change.  I'm also using
> > >
> > > the standard Mach3Mill Screens.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >  
> > >
> > >
> > >
>
Group: DynoMotion Message: 1113 From: Tom Kerekes Date: 5/7/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Yes.  Configure a Mach3 button to Toggle a KFLOP Output.  You could use IO47 which is the other KFLOP LED.
 
TK

Group: DynoMotion Message: 1114 From: tmday7 Date: 5/7/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Youll have to fill me in, would i configure a button to toggle an output in Mach? Kinda like the Flood Coolant button. Or is there VB to directly toggle the bit? Drawin a blank here as how to what scripting needs to happen.
Thanks,
Troy

---Tom Kerekes wrote:
>
> Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use IO47
> which is the other KFLOP LED.
>
> TK
>
>
>
> ________________________________
> From: tmday7
>
>  
> For temporary, can a VB button in Mach be made to do this?
>
> Thanks,
> Troy
>
> --- "tmday7"wrote:
> >
> > Ok. I remember that now.
> > Ill let you know.
> > Thanks,
> > Troy
> >
> > ---Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c
>
> > > program is expecting to switch from Closed Loop to Open Loop and so forth.
> > >
> > > I think Mach3 should NOT be in reset while in Manual mode.  I think the
> >trick
> >
> > > was that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created
> >that
> >
> > > Mach3 was configured to monitor rather than the Raw Estop signal coming from
> >the
> >
> > > PMDX. 
> > >
> > >
> > > Regards,
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7
> > >
> > >  
> > > Thats it :) Update to latest Mach3 lockdown fixed it. I was running 3.041
> > >
> > > Now onto next :) when we did the TriOnics we could flip a manual switch and
> >use
> >
> > > machine mill manualy without throwing Mach into Reset, or did it put Mach
> >into
> >
> > > Reset? I dont remember.
> > >
> > > I just tried it and while Mach is in Reset i could not zero any axis. BUT, i
>
> > > dont have my manual switch wired into Kflop, it just disables the Gecko
> >drives.
> > >
> > > Thanks again,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > I remember having this problem a while back, but don't remember how it was
>
> > > > resolved.
> > > >
> > > > I think the issue is your Mach3 Encoder DROs are displaying Machine
> >Coordinates
> >
> > > >
> > > > rather than Work Coordinates.
> > > >
> > > > If in Mach3 you go to the offsets Screen and change the Current Work Offset
> >X
> >
> > > > does both the Command DROs and Encoder DROs change by the amount of
> change?
> > > >
> > > > I just tried it on my Mach3 Version 3.042.038 and both change.  I'm also
> >using
> >
> > > >
> > > > the standard Mach3Mill Screens.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >  
> > > >
> > > >
> > > >
> >
>
Group: DynoMotion Message: 1115 From: tmday7 Date: 5/8/2011
Subject: Re: KFLOP Setup on a Mill/Drill
posted by:Michael

Hello tmday7

I have been following your thread in the Dynomotion group using the Kflop. Could you elaborate on what you have built. I have had similar ideas of building a bench mill however it appears as though you are using a Bridgeport type head is that correct?

Would you have more photos of the column and the method of attaching the head to the column?

Whose table, saddle and base are you using?

Did you buy a complete mill drill and remove the column and head and build your own?

Thanks

Michael
>>>>>>
I uploaded some more pics of mill.
http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list
Ya, its a Bridgeport Head bolted to a 3/4in plate, which is bolted to 2 I-Beams.The head can be rotated about 20degrees.

I used the original column mounting holes in the RongFu type base, except i bolted column from underneath.
The base,saddle and table came from ebay, as did some other parts also.

I still need to do a few other things to it, one being a counter weight for head.Theres a little more weight than i like overhanging the rails and Z screw.

Please keep in mind, this is a work in progress:) Hints some surface rust and holes in head;), etc. Its been in storage for about a year also. I like to get everything in sound working order THEN paint. Its a pain for me to have to Machine on a painted part. :)

HTH
Troy
Group: DynoMotion Message: 1116 From: tmday7 Date: 5/9/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Scratch the VB button, i took the time and got my control panel to the point where i will add my switches and buttons as i need them.:)
Ill let you know when i get Manual Mode switch up and going.

Got a couple more issues.....

1) The Reference Buttons for each axis in Mach do not Referance the axis. The only machine Referance that happens is when Mach is first started, and where ever machine axis is setting at startup of Mach, is where its Referance or Home position is.

2) The Softlimits i have set in Mach are not working. Is this sumthin that needs to be set in the C Program?

Thanks,
Troy

--- "tmday7" wrote:
>
> Youll have to fill me in, would i configure a button to toggle an output in Mach? Kinda like the Flood Coolant button. Or is there VB to directly toggle the bit? Drawin a blank here as how to what scripting needs to happen.
> Thanks,
> Troy
>
> ---Tom Kerekes wrote:
> >
> > Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use IO47
> > which is the other KFLOP LED.
> >
> > TK
> >
> >
> >
> > ________________________________
> > From: tmday7
> >
> >  
> > For temporary, can a VB button in Mach be made to do this?
> >
> > Thanks,
> > Troy
> >
> > --- "tmday7"wrote:
> >
> > Ok. I remember that now.
> > Ill let you know.
> > Thanks,
> > Troy
> >
> > ---Tom Kerekes wrote:
> >
> >Hi Troy,
Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c program is expecting to switch from Closed Loop to Open Loop and so forth.I think Mach3 should NOT be in reset while in Manual mode.I think the trick was that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that Mach3 was configured to monitor rather than the Raw Estop,signal coming from the PMDX.
> > > >
> > > >
> > > > Regards,
> > > > TK
Group: DynoMotion Message: 1117 From: Tom Kerekes Date: 5/9/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Regarding the REF buttons.  Did you follow the Ref Buttons instructions described here?
 

 
Regarding Soft Limits: those were handled by the parallel port driver and are not yet implemented.
 
TK 
 

Group: DynoMotion Message: 1118 From: tmday7 Date: 5/9/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I have Ref Buttons set and the HomeEncodersMach3 c. program.And when i hit any Ref Button, nothing comes up on the Kmotion Console.

Iam done for the night:)

Thanks,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Regarding the REF buttons.  Did you follow the Ref Buttons instructions
> described here?
>
> http://www.dynomotion.com/Help/Mach3Plugin/Mach3Encoders.htm
>
>  
> Regarding Soft Limits: those were handled by the parallel port driver and are
> not yet implemented.
>
> TK 
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Mon, May 9, 2011 6:10:55 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Scratch the VB button, i took the time and got my control panel to the point
> where i will add my switches and buttons as i need them.:)
> Ill let you know when i get Manual Mode switch up and going.
>
> Got a couple more issues.....
>
> 1) The Reference Buttons for each axis in Mach do not Referance the axis. The
> only machine Referance that happens is when Mach is first started, and where
> ever machine axis is setting at startup of Mach, is where its Referance or Home
> position is.
>
> 2) The Softlimits i have set in Mach are not working. Is this sumthin that needs
> to be set in the C Program?
>
> Thanks,
> Troy
>
> --- "tmday7" wrote:
> >
> > Youll have to fill me in, would i configure a button to toggle an output in
> >Mach? Kinda like the Flood Coolant button. Or is there VB to directly toggle the
> >bit? Drawin a blank here as how to what scripting needs to happen.
> > Thanks,
> > Troy
> >
> > ---Tom Kerekes wrote:
> > >
> > > Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use IO47
> > > which is the other KFLOP LED.
> > >
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7
> > >
> > >  
> > > For temporary, can a VB button in Mach be made to do this?
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- "tmday7"wrote:
> > >
> > > Ok. I remember that now.
> > > Ill let you know.
> > > Thanks,
> > > Troy
> > >
> > > ---Tom Kerekes wrote:
> > >
> > >Hi Troy,
> Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c
> program is expecting to switch from Closed Loop to Open Loop and so forth.I
> think Mach3 should NOT be in reset while in Manual mode.I think the trick was
> that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that Mach3
> was configured to monitor rather than the Raw Estop,signal coming from the PMDX.
> > > > >
> > > > >
> > > > > Regards,
> > > > > TK
>
Group: DynoMotion Message: 1119 From: Tom Kerekes Date: 5/10/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Do you have the Mach3 DynoMotion Plugin Configuration set to use that Home Program?
 
Maybe try the REF ALL HOME button on the standard Screen Set?
 
Regards
TK

Group: DynoMotion Message: 1120 From: tmday7 Date: 5/10/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Problem fixed,but not sure why :) I didnt change anything from where i left off last night.It may have been a reboot of Kflop and Mach3 or... i was just tired last night and missed sumthing. :)
Anyhow all is Referencing just fine.

As for Softlimits, let me know if i can help and test for you when you are ready to work on them.

Gonna do some more fine tunning of CL and some testing of Mach for any other issues i may have.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Do you have the Mach3 DynoMotion Plugin Configuration set to use that Home
> Program?
>
> Maybe try the REF ALL HOME button on the standard Screen Set?
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Mon, May 9, 2011 8:04:41 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> I have Ref Buttons set and the HomeEncodersMach3 c. program.And when i hit any
> Ref Button, nothing comes up on the Kmotion Console.
>
>
> Iam done for the night:)
>
> Thanks,
> Troy
>
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Regarding the REF buttons.  Did you follow the Ref Buttons instructions
> > described here?
> >
> > http://www.dynomotion.com/Help/Mach3Plugin/Mach3Encoders.htm
> >
> >  
> > Regarding Soft Limits: those were handled by the parallel port driver and are
> > not yet implemented.
> >
> > TK 
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Mon, May 9, 2011 6:10:55 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Scratch the VB button, i took the time and got my control panel to the point
> > where i will add my switches and buttons as i need them.:)
> > Ill let you know when i get Manual Mode switch up and going.
> >
> > Got a couple more issues.....
> >
> > 1) The Reference Buttons for each axis in Mach do not Referance the axis. The
> > only machine Referance that happens is when Mach is first started, and where
> > ever machine axis is setting at startup of Mach, is where its Referance or Home
> >
> > position is.
> >
> > 2) The Softlimits i have set in Mach are not working. Is this sumthin that
> >needs
> >
> > to be set in the C Program?
> >
> > Thanks,
> > Troy
> >
> > --- "tmday7" wrote:
> > >
> > > Youll have to fill me in, would i configure a button to toggle an output in
> > >Mach? Kinda like the Flood Coolant button. Or is there VB to directly toggle
> >the
> >
> > >bit? Drawin a blank here as how to what scripting needs to happen.
> > > Thanks,
> > > Troy
> > >
> > > ---Tom Kerekes wrote:
> > > >
> > > > Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use IO47
> > > > which is the other KFLOP LED.
> > > >
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7
> > > >
> > > >  
> > > > For temporary, can a VB button in Mach be made to do this?
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- "tmday7"wrote:
> > > >
> > > > Ok. I remember that now.
> > > > Ill let you know.
> > > > Thanks,
> > > > Troy
> > > >
> > > > ---Tom Kerekes wrote:
> > > >
> > > >Hi Troy,
> > Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c
> > program is expecting to switch from Closed Loop to Open Loop and so forth.I
> > think Mach3 shouldÃÆ'‚ NOT be in reset while in Manual mode.I think the
> >trick was
> >
> > that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that
> >Mach3
> >
> > was configured to monitor rather than the Raw Estop,signal coming from the
> >PMDX.
> > > > > >
> > > > > >
> > > > > > Regards,
> > > > > > TK
> >
>
Group: DynoMotion Message: 1121 From: tmday7 Date: 5/10/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok. Got my Manual Mode switch wired up. But not working:( I wired one side of switch to pin 1 of Kflop and other side to pin 6 of Kflop. In Kmotion Digital I/O screen when flipping swith, the bit 45 toggles.

If i toggle bit 47 LED1, then manual mode enables in Mach and i can move axis with handwheels.
What am i missing? :)
Thanks,
Troy

--- "tmday7" wrote:
>
> Problem fixed,but not sure why :) I didnt change anything from where i left off last night.It may have been a reboot of Kflop and Mach3 or... i was just tired last night and missed sumthing. :)
> Anyhow all is Referencing just fine.
>
> As for Softlimits, let me know if i can help and test for you when you are ready to work on them.
>
> Gonna do some more fine tunning of CL and some testing of Mach for any other issues i may have.
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Do you have the Mach3 DynoMotion Plugin Configuration set to use that Home
> > Program?
> >
> > Maybe try the REF ALL HOME button on the standard Screen Set?
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Mon, May 9, 2011 8:04:41 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > I have Ref Buttons set and the HomeEncodersMach3 c. program.And when i hit any
> > Ref Button, nothing comes up on the Kmotion Console.
> >
> >
> > Iam done for the night:)
> >
> > Thanks,
> > Troy
> >
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Regarding the REF buttons.  Did you follow the Ref Buttons instructions
> > > described here?
> > >
> > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3Encoders.htm
> > >
> > >  
> > > Regarding Soft Limits: those were handled by the parallel port driver and are
> > > not yet implemented.
> > >
> > > TK 
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Mon, May 9, 2011 6:10:55 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Scratch the VB button, i took the time and got my control panel to the point
> > > where i will add my switches and buttons as i need them.:)
> > > Ill let you know when i get Manual Mode switch up and going.
> > >
> > > Got a couple more issues.....
> > >
> > > 1) The Reference Buttons for each axis in Mach do not Referance the axis. The
> > > only machine Referance that happens is when Mach is first started, and where
> > > ever machine axis is setting at startup of Mach, is where its Referance or Home
> > >
> > > position is.
> > >
> > > 2) The Softlimits i have set in Mach are not working. Is this sumthin that
> > >needs
> > >
> > > to be set in the C Program?
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- "tmday7" wrote:
> > > >
> > > > Youll have to fill me in, would i configure a button to toggle an output in
> > > >Mach? Kinda like the Flood Coolant button. Or is there VB to directly toggle
> > >the
> > >
> > > >bit? Drawin a blank here as how to what scripting needs to happen.
> > > > Thanks,
> > > > Troy
> > > >
> > > > ---Tom Kerekes wrote:
> > > > >
> > > > > Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use IO47
> > > > > which is the other KFLOP LED.
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7
> > > > >
> > > > >  
> > > > > For temporary, can a VB button in Mach be made to do this?
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > --- "tmday7"wrote:
> > > > >
> > > > > Ok. I remember that now.
> > > > > Ill let you know.
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > ---Tom Kerekes wrote:
> > > > >
> > > > >Hi Troy,
> > > Yes you will need to wire in the Auto/Manual switch that the Mach3_CL_PMDX.c
> > > program is expecting to switch from Closed Loop to Open Loop and so forth.I
> > > think Mach3 shouldÃÆ'‚ NOT be in reset while in Manual mode.I think the
> > >trick was
> > >
> > > that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that
> > >Mach3
> > >
> > > was configured to monitor rather than the Raw Estop,signal coming from the
> > >PMDX.
> > > > > > >
> > > > > > >
> > > > > > > Regards,
> > > > > > > TK
> > >
> >
>
Group: DynoMotion Message: 1122 From: Tom Kerekes Date: 5/10/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT set to bit 45 if that is what you have a switch wired to.
 
change 
 
#define MANUALBIT 47

to
 
#define MANUALBIT 45
TK
Group: DynoMotion Message: 1123 From: tmday7 Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Changed to 45, but doesnt work. I noticed in the Digital I/O that the State is what toggles and not the Output.

Also, i wired up coolant pump and when trying to turn pump on and off from Mach, nothing happens. But if i toggle the bit in Kmotion then the pump turns on and off.

Troy

--- Tom Kerekeswrote:
>
> I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT
> set to bit 45 if that is what you have a switch wired to.
>
> change 
>
> #define MANUALBIT 47
>
> to
>
> #define MANUALBIT 45
>
> TK
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, May 10, 2011 7:11:39 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Ok. Got my Manual Mode switch wired up. But not working:( I wired one side of
> switch to pin 1 of Kflop and other side to pin 6 of Kflop. In Kmotion Digital
> I/O screen when flipping swith, the bit 45 toggles.
>
> If i toggle bit 47 LED1, then manual mode enables in Mach and i can move axis
> with handwheels.
> What am i missing? :)
> Thanks,
> Troy
>
> --- "tmday7" wrote:
> >
> > Problem fixed,but not sure why :) I didnt change anything from where i left off
> >last night.It may have been a reboot of Kflop and Mach3 or... i was just tired
> >last night and missed sumthing. :)
> > Anyhow all is Referencing just fine.
> >
> > As for Softlimits, let me know if i can help and test for you when you are
> >ready to work on them.
> >
> > Gonna do some more fine tunning of CL and some testing of Mach for any other
> >issues i may have.
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Do you have the Mach3 DynoMotion Plugin Configuration set to use that Home
> > > Program?
> > >
> > > Maybe try the REF ALL HOME button on the standard Screen Set?
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Mon, May 9, 2011 8:04:41 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > I have Ref Buttons set and the HomeEncodersMach3 c. program.And when i hit
> >any
> >
> > > Ref Button, nothing comes up on the Kmotion Console.
> > >
> > >
> > > Iam done for the night:)
> > >
> > > Thanks,
> > > Troy
> > >
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Regarding the REF buttons.  Did you follow the Ref Buttons instructions
>
> > > > described here?
> > > >
> > > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3Encoders.htm
> > > >
> > > >  
> > > > Regarding Soft Limits: those were handled by the parallel port driver and
> >are
> >
> > > > not yet implemented.
> > > >
> > > > TK 
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Mon, May 9, 2011 6:10:55 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Scratch the VB button, i took the time and got my control panel to the
> >point
> >
> > > > where i will add my switches and buttons as i need them.:)
> > > > Ill let you know when i get Manual Mode switch up and going.
> > > >
> > > > Got a couple more issues.....
> > > >
> > > > 1) The Reference Buttons for each axis in Mach do not Referance the axis.
> >The
> >
> > > > only machine Referance that happens is when Mach is first started, and
> >where
> >
> > > > ever machine axis is setting at startup of Mach, is where its Referance or
> >Home
> >
> > > >
> > > > position is.
> > > >
> > > > 2) The Softlimits i have set in Mach are not working. Is this sumthin that
>
> > > >needs
> > > >
> > > > to be set in the C Program?
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- "tmday7" wrote:
> > > > >
> > > > > Youll have to fill me in, would i configure a button to toggle an output
> >in
> >
> > > > >Mach? Kinda like the Flood Coolant button. Or is there VB to directly
> >toggle
> >
> > > >the
> > > >
> > > > >bit? Drawin a blank here as how to what scripting needs to happen.
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > ---Tom Kerekes wrote:
> > > > > >
> > > > > > Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use
> >IO47
> >
> > > > > > which is the other KFLOP LED.
> > > > > >
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7
> > > > > >
> > > > > > ÃÆ'‚ 
> > > > > > For temporary, can a VB button in Mach be made to do this?
> > > > > >
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > --- "tmday7"wrote:
> > > > > >
> > > > > > Ok. I remember that now.
> > > > > > Ill let you know.
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > ---Tom Kerekes wrote:
> > > > > >
> > > > > >Hi Troy,
> > > > Yes you will need to wire in the Auto/Manual switch that the
> >Mach3_CL_PMDX.c
> >
> > > > program is expecting to switch from Closed Loop to Open Loop and so forth.I
> >
> > > > think Mach3 shouldÃÆ'Æ'‚ÃÆ'‚ NOT be in reset while in Manual
> >mode.I think the
> >
> > > >trick was
> > > >
> > > > that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created that
>
> > > >Mach3
> > > >
> > > > was configured to monitor rather than the Raw Estop,signal coming from the
>
> > > >PMDX.
> > > > > > > >
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > TK
> > > >
> > >
> >
>
Group: DynoMotion Message: 1124 From: Tom Kerekes Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Can you be a bit more descriptive than "doesn't work".  How do you have things configured in Mach3?  What are you doing?  What do you expect to happen? What actually does happen?
 
Thanks
TK

Group: DynoMotion Message: 1125 From: tmday7 Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
"I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT set to bit 45 if that is what you have a switch wired to."

After i did this and flipped switch to enable manual mode(changes from ClosedLoop to OpenLoop), Kmotion bit 45 STATE toggles, i then try to move axis with Handwheels,but Mach goes into Reset, which will not allow me to Zero axis.

If i go to Kmotion and toggle the bit 45 OUTPUT then i can move axis with handwheels and Mach does Not go into Reset.

How do i get the bit 45 OUTPUT to toggle by using the switch on pin 6 of Kflop? Right now the switch only toggles the STATE of bit 45.

As for Coolant pump, i got it:) Forgot that "When using the KMotion Plugin, Pin Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port Pins." :)

Thanks,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Can you be a bit more descriptive than "doesn't work".  How do you have things
> configured in Mach3?  What are you doing?  What do you expect to happen? What
> actually does happen?
>
> Thanks
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, May 11, 2011 8:51:44 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Changed to 45, but doesnt work. I noticed in the Digital I/O that the State is
> what toggles and not the Output.
>
> Also, i wired up coolant pump and when trying to turn pump on and off from Mach,
> nothing happens. But if i toggle the bit in Kmotion then the pump turns on and
> off.
>
> Troy
>
> --- Tom Kerekeswrote:
> >
> > I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT
> > set to bit 45 if that is what you have a switch wired to.
> >
> > change 
> >
> > #define MANUALBIT 47
> >
> > to
> >
> > #define MANUALBIT 45
> >
> > TK
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tue, May 10, 2011 7:11:39 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Ok. Got my Manual Mode switch wired up. But not working:( I wired one side of
> > switch to pin 1 of Kflop and other side to pin 6 of Kflop. In Kmotion Digital
> > I/O screen when flipping swith, the bit 45 toggles.
> >
> > If i toggle bit 47 LED1, then manual mode enables in Mach and i can move axis
> > with handwheels.
> > What am i missing? :)
> > Thanks,
> > Troy
> >
> > --- "tmday7" wrote:
> > >
> > > Problem fixed,but not sure why :) I didnt change anything from where i left
> >off
> >
> > >last night.It may have been a reboot of Kflop and Mach3 or... i was just tired
> >
> > >last night and missed sumthing. :)
> > > Anyhow all is Referencing just fine.
> > >
> > > As for Softlimits, let me know if i can help and test for you when you are
> > >ready to work on them.
> > >
> > > Gonna do some more fine tunning of CL and some testing of Mach for any other
>
> > >issues i may have.
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Do you have the Mach3 DynoMotion Plugin Configuration set to use that Home
>
> > > > Program?
> > > >
> > > > Maybe try the REF ALL HOME button on the standard Screen Set?
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Mon, May 9, 2011 8:04:41 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > I have Ref Buttons set and the HomeEncodersMach3 c. program.And when i hit
>
> > >any
> > >
> > > > Ref Button, nothing comes up on the Kmotion Console.
> > > >
> > > >
> > > > Iam done for the night:)
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > Regarding the REF buttons.ÃÆ'‚  Did you follow the Ref Buttons
> >instructions
> >
> >
> > > > > described here?
> > > > >
> > > > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3Encoders.htm
> > > > >
> > > > > ÃÆ'‚ 
> > > > > Regarding Soft Limits: those were handled by the parallel port driver and
> >
> > >are
> > >
> > > > > not yet implemented.
> > > > >
> > > > > TKÃÆ'‚ 
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Mon, May 9, 2011 6:10:55 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > ÃÆ'‚ 
> > > > > Scratch the VB button, i took the time and got my control panel to the
> > >point
> > >
> > > > > where i will add my switches and buttons as i need them.:)
> > > > > Ill let you know when i get Manual Mode switch up and going.
> > > > >
> > > > > Got a couple more issues.....
> > > > >
> > > > > 1) The Reference Buttons for each axis in Mach do not Referance the axis.
> >
> > >The
> > >
> > > > > only machine Referance that happens is when Mach is first started, and
> > >where
> > >
> > > > > ever machine axis is setting at startup of Mach, is where its Referance
> >or
> >
> > >Home
> > >
> > > > >
> > > > > position is.
> > > > >
> > > > > 2) The Softlimits i have set in Mach are not working. Is this sumthin
> >that
> >
> >
> > > > >needs
> > > > >
> > > > > to be set in the C Program?
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > --- "tmday7" wrote:
> > > > > >
> > > > > > Youll have to fill me in, would i configure a button to toggle an
> >output
> >
> > >in
> > >
> > > > > >Mach? Kinda like the Flood Coolant button. Or is there VB to directly
> > >toggle
> > >
> > > > >the
> > > > >
> > > > > >bit? Drawin a blank here as how to what scripting needs to happen.
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > ---Tom Kerekes wrote:
> > > > > > >
> > > > > > > Yes.Configure a Mach3 button to Toggle a KFLOP Output. You could use
>
> > >IO47
> > >
> > > > > > > which is the other KFLOP LED.
> > > > > > >
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > > > For temporary, can a VB button in Mach be made to do this?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > > > --- "tmday7"wrote:
> > > > > > >
> > > > > > > Ok. I remember that now.
> > > > > > > Ill let you know.
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > > > ---Tom Kerekes wrote:
> > > > > > >
> > > > > > >Hi Troy,
> > > > > Yes you will need to wire in the Auto/Manual switch that the
> > >Mach3_CL_PMDX.c
> > >
> > > > > program is expecting to switch from Closed Loop to Open Loop and so
> >forth.I
> >
> > >
> > > > > think Mach3 shouldÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ NOT be in
> >reset while in Manual
> >
> > >mode.I think the
> > >
> > > > >trick was
> > > > >
> > > > > that a Simulated EStop Bit (KFLOP IO46 - one of the LEDS) was created
> >that
> >
> >
> > > > >Mach3
> > > > >
> > > > > was configured to monitor rather than the Raw Estop,signal coming from
> >the
> >
> >
> > > > >PMDX.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > > TK
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1126 From: Tom Kerekes Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Thanks that gives me a better understanding of what is happening.
 
You should understand that the KFLOP I/O pins can be configured either as INPUTS or OUTPUTS.  The column of check boxes with the heading OUTPUT indicates if the pin is to be an input or output.  If the check box is checked it means that it is an Output and KFLOP is driving the voltage on the pin to be high or low.  The STATE column indicates if the pin is currently high or low (checked indicates high).  If the OUTPUT checkbox is unchecked the pin will be an input and will not be driven by KFLOP and will be in a "floating" state.  A floating input will be in an unpredictable state.  It might float high or low or even toggle on its own depending on what other signals are close by.  It is the responsibility of an external device to drive the input to either a high or low level for it to be in a predictable state.
 
There are two problems with what you are describing:
 
#1 We are intending to use IO45 as an INPUT of the position of your Manual/Auto switch.  Adding a switch between JP7 Pin6 (IO45) and JP7 Pin1 (3.3V) will indeed force the pin high when the switch is closed, but when the switch opens the pin will float and not necessarily go low.   A (~1K Ohm) pull down resistor should be added to hold the pin low when the switch is open.  Alternatively the first 8 I/O pins on JP4 and JP6 have internal pull down resistors (150 Ohms).  So if you switch to use any of those 16 inputs you will not need to add an external pull down resistor.
 
#2 If you are driving an IO pin externally with a switch (or anything else) you should NOT select that as an OUTPUT.  This can cause a fight between KFLOP trying to force the pin high or low and the external device trying to force the pin high or low.  Whoever is stronger will win and may cause damage to the weaker driver. 
 
Sorry for the long winded reply but I think we should fix these issues first then see where we are at.
 
Thanks
TK
 

Group: DynoMotion Message: 1127 From: tmday7 Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
What i have know. I placed a 1k resistor on pin 6 bit45. When i close switch the STATE of bit45 toggles on and bit46 STATE toggles on for maybe 1 second then toggles off, the LED of bit46 confirms this.

I then Configured Ports/Pins in Mach, on Inputs tab i selected input #1 as port 1 pin 45. Now when i close switch (applying 3.3volts to pin 6 bit45)Mach will go into reset if i move axis with handwheels, but, when i open switch (removing 3.3v from pin 6 bit45)i can then move axis with handwheels and Mach does not go into Reset and i can use machine manually.

So is this the way we want it? Or should it be reversed, when switch is OPEN then Mach will go into Reset when axis is moved with handwheels?

Thanks,
Troy

--- Tom Kerekeswrote:
>
> Hi Troy,
>
> Thanks that gives me a better understanding of what is happening.
>
> You should understand that the KFLOP I/O pins can be configured either as INPUTS or OUTPUTS. The column of check boxes with the heading OUTPUT indicates if the pin is to be an input or output.  If the check box is checked it means that it is an Output and KFLOP is driving the voltage on the pin to be high or low.  The STATE column indicates if the pin is currently high or low (checked indicates
high). If the OUTPUT checkbox is unchecked the pin will be an input and will not be driven by KFLOP and will be in a "floating" state.  A floating input will be in an unpredictable state.  It might float high or low or even toggle on its own depending on what other signals are close by.  It is the responsibility of an external device to drive the input to either a high or low level for it to be in a predictable state.
>
> There are two problems with what you are describing:
>
> #1 We are intending to use IO45 as an INPUT of the position of your Manual/Auto switch.  Adding a switch between JP7 Pin6 (IO45) and JP7 Pin1 (3.3V) will indeed force the pin high when the switch is closed, but when the switch opens the pin will float and not necessarily go low.A (~1K Ohm) pull down resistor should be added to hold the pin low when the switch is open.  Alternatively the first 8 I/O pins on JP4 and JP6 have internal pull down resistors (150 Ohms).  So if you switch to use any of those 16 inputs you will not need to add an external pull down resistor.
>
> #2 If you are driving an IO pin externally with a switch (or anything else) you should NOT select that as an OUTPUT.  This can cause a fight between KFLOP trying to force the pin high or low and the external device trying to force the pin high or low.  Whoever is stronger will win and may cause damage to the weaker driver. 
>
> Sorry for the long winded reply but I think we should fix these issues first then see where we are at.
>
> Thanks
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, May 11, 2011 10:56:35 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> "I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT
> set to bit 45 if that is what you have a switch wired to."
>
> After i did this and flipped switch to enable manual mode(changes from
> ClosedLoop to OpenLoop), Kmotion bit 45 STATE toggles, i then try to move axis
> with Handwheels,but Mach goes into Reset, which will not allow me to Zero axis.
>
> If i go to Kmotion and toggle the bit 45 OUTPUT then i can move axis with
> handwheels and Mach does Not go into Reset.
>
> How do i get the bit 45 OUTPUT to toggle by using the switch on pin 6 of Kflop?
> Right now the switch only toggles the STATE of bit 45.
>
> As for Coolant pump, i got it:) Forgot that "When using the KMotion Plugin, Pin
> Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port
> Pins." :)
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Can you be a bit more descriptive than "doesn't work".  How do you have things
> >
> > configured in Mach3?  What are you doing?  What do you expect to happen? What
> >
> > actually does happen?
> >
> > Thanks
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wed, May 11, 2011 8:51:44 AM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Changed to 45, but doesnt work. I noticed in the Digital I/O that the State is
>
> > what toggles and not the Output.
> >
> > Also, i wired up coolant pump and when trying to turn pump on and off from
> >Mach,
> >
> > nothing happens. But if i toggle the bit in Kmotion then the pump turns on and
>
> > off.
> >
> > Troy
> >
> > --- Tom Kerekeswrote:
> > >
> > > I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT
> >
> > > set to bit 45 if that is what you have a switch wired to.
> > >
> > > change 
> > >
> > > #define MANUALBIT 47
> > >
> > > to
> > >
> > > #define MANUALBIT 45
> > >
> > > TK
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tue, May 10, 2011 7:11:39 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Ok. Got my Manual Mode switch wired up. But not working:( I wired one side of
> >
> > > switch to pin 1 of Kflop and other side to pin 6 of Kflop. In Kmotion Digital
> >
> > > I/O screen when flipping swith, the bit 45 toggles.
> > >
> > > If i toggle bit 47 LED1, then manual mode enables in Mach and i can move axis
> >
> > > with handwheels.
> > > What am i missing? :)
> > > Thanks,
> > > Troy
Group: DynoMotion Message: 1128 From: Tom Kerekes Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
ok I think that is the functionality we want.  Closing the switch puts us in AUTO mode.  When the Mach3_CL_PMDX.c program sees this it places KFLOP in Closed loop mode and Pulses the Simulated EStop to Mach3 (for some reason we decided that when transitioning back to Auto from Manual we should place Mach3 into EStop mode to force the Operator to Reset the System before continuing).  If you move the handwheels in closed loop mode KFLOP detects a Following error and Disables the axis which in turn throws Mach3 into EStop mode.  This is correct behavior.
 
Opening the switch puts us into Manual mode.  When the Mach3_CL_PMDX.c program sees this it places KFLOP in Open loop mode.  In Open loop mode KFLOP does not watch for following errors.  This is correct behavior
 
Do you also have the Manual/Auto signal wired into the PMDX so it disables the amplifiers in Manual Mode but not in Auto Mode?
 
Defining Mach3 Input#1 when Input#1 that is never used doesn't do anything so I'm not sure why you did this.
 
What is the Mach3 EStop Input defined as?  It should be set to Port 1 Pin 46 which is our Simulated EStop.
 
The raw EStop coming from the PMDX should be wired to IO14 (JP7 Pin 21) is that working? 
TK

Group: DynoMotion Message: 1129 From: tmday7 Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
So its ok to have 3.3v applied to pin 6 all the time?

"(for some reason we decided that when transitioning back to Auto from Manual we should place Mach3 into EStop mode to force the Operator to Reset the System before continuing)"

At that time,(On the TriOnics mill) doing this would update the Command DROs to what the Encoder DROs were reading, cause i remember telling you then, that was fine with me:)

But now, when i close switch,(Auto mode) there is no reset and the Command DROs automatically update to Encoder DROs.This is good also ;)

" Do you also have the Manual/Auto signal wired into the PMDX so it disables the amplifiers in Manual Mode but not in Auto Mode?"

No. I have a seperate switch for that, actually 2, 1 for X and Y, 2nd for Z axis.

"Defining Mach3 Input#1 when Input#1 that is never used doesn't do anything so I'm not sure why you did this."
When i said this it would not work until i set the ports and pins.So to double check i went back and removed the Ports/Pins settings , and now it works. ?!?! Only thing i have done is shut down Kmotion and Mach3.

"What is the Mach3 EStop Input defined as? It should be set to Port 1 Pin 46 which is our Simulated EStop."
I dont fully understand this one but,no its set at Port1 pin 14.

"The raw EStop coming from the PMDX should be wired to IO14 (JP7 Pin 21) is that working?" This is correct.

Thanks,
Troy


--- Tom Kerekes wrote:
>
> ok I think that is the functionality we want.  Closing the switch puts us in AUTO mode.  When the Mach3_CL_PMDX.c program sees this it places KFLOP in Closed loop mode and Pulses the Simulated EStop to Mach3 (for some reason we decided that when transitioning back to Auto from Manual we should place Mach3 into EStop mode to force the Operator to Reset the System before continuing).If you move the handwheels in closed loop mode KFLOP detects a Following error and
Disables the axis which in turn throws Mach3 into EStop mode.  This is correct behavior.
>
> Opening the switch puts us into Manual mode.  When the Mach3_CL_PMDX.c program sees this it places KFLOP in Open loop mode.  In Open loop mode KFLOP does not watch for following errors.  This is correct behavior
>
>
> Do you also have the Manual/Auto signal wired into the PMDX so it disables the amplifiers in Manual Mode but not in Auto Mode?
>
> Defining Mach3 Input#1 when Input#1 that is never used doesn't do anything so
> I'm not sure why you did this.
>
> What is the Mach3 EStop Input defined as? It should be set to Port 1 Pin 46 which is our Simulated EStop.
>
> The raw EStop coming from the PMDX should be wired to IO14 (JP7 Pin 21) is that working? 
>
> TK
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, May 11, 2011 3:21:22 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> What i have know. I placed a 1k resistor on pin 6 bit45. When i close switch the
> STATE of bit45 toggles on and bit46 STATE toggles on for maybe 1 second then
> toggles off, the LED of bit46 confirms this.
>
> I then Configured Ports/Pins in Mach, on Inputs tab i selected input #1 as port
> 1 pin 45. Now when i close switch (applying 3.3volts to pin 6 bit45)Mach will go
> into reset if i move axis with handwheels, but, when i open switch (removing
> 3.3v from pin 6 bit45)i can then move axis with handwheels and Mach does not go
> into Reset and i can use machine manually.
>
> So is this the way we want it? Or should it be reversed, when switch is OPEN
> then Mach will go into Reset when axis is moved with handwheels?
>
> Thanks,
> Troy
>
> --- Tom Kerekeswrote:
> >
> > Hi Troy,
> >
> > Thanks that gives me a better understanding of what is happening.
> >
> > You should understand that the KFLOP I/O pins can be configured either as
> >INPUTS or OUTPUTS. The column of check boxes with the heading OUTPUT indicates
> >if the pin is to be an input or output.  If the check box is checked it means
> >that it is an Output and KFLOP is driving the voltage on the pin to be high or
> >low.  The STATE column indicates if the pin is currently high or low (checked
> >indicates
> >
> high). If the OUTPUT checkbox is unchecked the pin will be an input and will
> not be driven by KFLOP and will be in a "floating" state.  A floating input
> will be in an unpredictable state.  It might float high or low or even toggle
> on its own depending on what other signals are close by.  It is the
> responsibility of an external device to drive the input to either a high or
> low level for it to be in a predictable state.
> >
> > There are two problems with what you are describing:
> >
> > #1 We are intending to use IO45 as an INPUT of the position of your
> >Manual/Auto switch.  Adding a switch between JP7 Pin6 (IO45) and JP7 Pin1
> >(3.3V) will indeed force the pin high when the switch is closed, but when the
> >switch opens the pin will float and not necessarily go low.A (~1K Ohm) pull
> >down resistor should be added to hold the pin low when the switch is open. 
> >Alternatively the first 8 I/O pins on JP4 and JP6 have internal pull down
> >resistors (150 Ohms).  So if you switch to use any of those 16 inputs you will
> >not need to add an external pull down resistor.
> >
> > #2 If you are driving an IO pin externally with a switch (or anything else) you
> >should NOT select that as an OUTPUT.  This can cause a fight between KFLOP
> >trying to force the pin high or low and the external device trying to force the
> >pin high or low.  Whoever is stronger will win and may cause damage to the
> >weaker driver. 
> >
> >
> > Sorry for the long winded reply but I think we should fix these issues first
> >then see where we are at.
> >
> > Thanks
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wed, May 11, 2011 10:56:35 AM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > "I think you need to change your Mach3_CL_PMDX.c program to have the MANUALBIT
>
> > set to bit 45 if that is what you have a switch wired to."
> >
> > After i did this and flipped switch to enable manual mode(changes from
> > ClosedLoop to OpenLoop), Kmotion bit 45 STATE toggles, i then try to move axis
>
> > with Handwheels,but Mach goes into Reset, which will not allow me to Zero
> axis.
> >
> > If i go to Kmotion and toggle the bit 45 OUTPUT then i can move axis with
> > handwheels and Mach does Not go into Reset.
> >
> > How do i get the bit 45 OUTPUT to toggle by using the switch on pin 6 of Kflop?
> >
> > Right now the switch only toggles the STATE of bit 45.
> >
> > As for Coolant pump, i got it:) Forgot that "When using the KMotion Plugin, Pin
> >
> > Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port
> > Pins." :)
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Can you be a bit more descriptive than "doesn't work".  How do you have
> >things
> >
> > >
> > > configured in Mach3?  What are you doing?  What do you expect to
> >happen? What
> >
> > >
> > > actually does happen?
> > >
> > > Thanks
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Wed, May 11, 2011 8:51:44 AM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Changed to 45, but doesnt work. I noticed in the Digital I/O that the State
> >is
> >
> >
> > > what toggles and not the Output.
> > >
> > > Also, i wired up coolant pump and when trying to turn pump on and off from
> > >Mach,
> > >
> > > nothing happens. But if i toggle the bit in Kmotion then the pump turns on
> >and
> >
> >
> > > off.
> > >
> > > Troy
> > >
> > > --- Tom Kerekeswrote:
> > > >
> > > > I think you need to change your Mach3_CL_PMDX.c program to have the
> >MANUALBIT
> >
> > >
> > > > set to bit 45 if that is what you have a switch wired to.
> > > >
> > > > changeÃÆ'‚ 
> > > >
> > > > #define MANUALBIT 47
> > > >
> > > > to
> > > >
> > > > #define MANUALBIT 45
> > > >
> > > > TK
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tue, May 10, 2011 7:11:39 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÃÆ'‚ 
> > > > Ok. Got my Manual Mode switch wired up. But not working:( I wired one side
> >of
> >
> > >
> > > > switch to pin 1 of Kflop and other side to pin 6 of Kflop. In Kmotion
> >Digital
> >
> > >
> > > > I/O screen when flipping swith, the bit 45 toggles.
> > > >
> > > > If i toggle bit 47 LED1, then manual mode enables in Mach and i can move
> >axis
> >
> > >
> > > > with handwheels.
> > > > What am i missing? :)
> > > > Thanks,
> > > > Troy
>
Group: DynoMotion Message: 1130 From: Tom Kerekes Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Now you have Mach3 looking at the "raw" EStop coming from the PMDX board rather than our "Simulated" EStop.
 
The reason we came up with the "Simulated" Estop signal was because of an issue with the PMDX board.  When operating in Manual Mode we sent the Disable Signal to the PMDX board to disable the amplifiers.  But this caused the PMDX to force its EStop signal which in turn threw Mach3 into EStop.  While Mach3 is in EStop certain functions like RESET X and such wouldn't work properly.  Also I don't think Mach3 should be blinking EStop just because it is in Manual Mode.
 
So now I'm confused.  You have Mach3 watching the raw EStop from the PMDX and you can switch the PMDX to disable and enable mode without causing Mach3 to EStop?
 
Thanks
TK

 

Group: DynoMotion Message: 1131 From: tmday7 Date: 5/11/2011
Subject: Re: KFLOP Setup on a Mill/Drill
"....you can switch the PMDX to disable and enable mode without causing Mach3 to EStop?"

This PMDX-125 is different from the PMDX-131 which was on the TriOnics. With this one the disable drive is separate from the EStop and i can disable one drive at a time with seperate switches or chain them together and disable them with one switch. Now when Estop is hit all motion stops and drives stay enabled.I can wire up my Estop to disable drives also, but i like the sudden stop with no freespin when EStop is hit. :)

Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Now you have Mach3 looking at the "raw" EStop coming from the PMDX board rather
> than our "Simulated" EStop.
>
> The reason we came up with the "Simulated" Estop signal was because of an issue
> with the PMDX board.  When operating in Manual Mode we sent the Disable Signal
> to the PMDX board to disable the amplifiers.  But this caused the PMDX to force
> its EStop signal which in turn threw Mach3 into EStop.  While Mach3 is in EStop
> certain functions like RESET X and such wouldn't work properly.  Also I don't
> think Mach3 should be blinking EStop just because it is in Manual Mode.
>
> So now I'm confused.  You have Mach3 watching the raw EStop from the PMDX and
> you can switch the PMDX to disable and enable mode without causing Mach3 to
> EStop?
>
> Thanks
> TK
>
>  
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, May 11, 2011 5:31:14 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> So its ok to have 3.3v applied to pin 6 all the time?
>
> "(for some reason we decided that when transitioning back to Auto from Manual we
> should place Mach3 into EStop mode to force the Operator to Reset the System
> before continuing)"
>
> At that time,(On the TriOnics mill) doing this would update the Command DROs to
> what the Encoder DROs were reading, cause i remember telling you then, that was
> fine with me:)
>
> But now, when i close switch,(Auto mode) there is no reset and the Command DROs
> automatically update to Encoder DROs.This is good also ;)
>
> " Do you also have the Manual/Auto signal wired into the PMDX so it disables the
> amplifiers in Manual Mode but not in Auto Mode?"
>
> No. I have a seperate switch for that, actually 2, 1 for X and Y, 2nd for Z
> axis.
>
> "Defining Mach3 Input#1 when Input#1 that is never used doesn't do anything so
> I'm not sure why you did this."
> When i said this it would not work until i set the ports and pins.So to double
> check i went back and removed the Ports/Pins settings , and now it works. ?!?!
> Only thing i have done is shut down Kmotion and Mach3.
>
> "What is the Mach3 EStop Input defined as? It should be set to Port 1 Pin 46
> which is our Simulated EStop."
> I dont fully understand this one but,no its set at Port1 pin 14.
>
> "The raw EStop coming from the PMDX should be wired to IO14 (JP7 Pin 21) is that
> working?" This is correct.
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > ok I think that is the functionality we want.  Closing the switch puts us in
> >AUTO mode.  When the Mach3_CL_PMDX.c program sees this it places KFLOP in
> >Closed loop mode and Pulses the Simulated EStop to Mach3 (for some reason we
> >decided that when transitioning back to Auto from Manual we should place Mach3
> >into EStop mode to force the Operator to Reset the System before continuing).If
> >you move the handwheels in closed loop mode KFLOP detects a Following error and
> >
> Disables the axis which in turn throws Mach3 into EStop mode.  This is correct
> behavior.
> >
> > Opening the switch puts us into Manual mode.  When the Mach3_CL_PMDX.c program
> >sees this it places KFLOP in Open loop mode.  In Open loop mode KFLOP does not
> >watch for following errors.  This is correct behavior
> >
> >
> > Do you also have the Manual/Auto signal wired into the PMDX so it disables the
> >amplifiers in Manual Mode but not in Auto Mode?
> >
> > Defining Mach3 Input#1 when Input#1 that is never used doesn't do anything so
> > I'm not sure why you did this.
> >
> > What is the Mach3 EStop Input defined as? It should be set to Port 1 Pin 46
> >which is our Simulated EStop.
> >
> > The raw EStop coming from the PMDX should be wired to IO14 (JP7 Pin 21) is that
> >working? 
> >
> > TK
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wed, May 11, 2011 3:21:22 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > What i have know. I placed a 1k resistor on pin 6 bit45. When i close switch
> >the
> >
> > STATE of bit45 toggles on and bit46 STATE toggles on for maybe 1 second then
> > toggles off, the LED of bit46 confirms this.
> >
> > I then Configured Ports/Pins in Mach, on Inputs tab i selected input #1 as port
> >
> > 1 pin 45. Now when i close switch (applying 3.3volts to pin 6 bit45)Mach will
> >go
> >
> > into reset if i move axis with handwheels, but, when i open switch (removing
> > 3.3v from pin 6 bit45)i can then move axis with handwheels and Mach does not go
> >
> > into Reset and i can use machine manually.
> >
> > So is this the way we want it? Or should it be reversed, when switch is OPEN
> > then Mach will go into Reset when axis is moved with handwheels?
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekeswrote:
> > >
> > > Hi Troy,
> > >
> > > Thanks that gives me a better understanding of what is happening.
> > >
> > > You should understand that the KFLOP I/O pins can be configured either as
> > >INPUTS or OUTPUTS. The column of check boxes with the heading OUTPUT indicates
> >
> > >if the pin is to be an input or output.  If the check box is checked it
> >means
> >
> > >that it is an Output and KFLOP is driving the voltage on the pin to be high or
> >
> > >low.  The STATE column indicates if the pin is currently high or low
> >(checked
> >
> > >indicates
> > >
> > high). If the OUTPUT checkbox is unchecked the pin will be an input
> >and will
> >
> > not be driven by KFLOP and will be in a "floating" state.  A floating input
>
> > will be in an unpredictable state.  It might float high or low or even
> >toggle
> >
> > on its own depending on what other signals are close by.  It is the
> > responsibility of an external device to drive the input to either a high
> >or
> >
> > low level for it to be in a predictable state.
> > >
> > > There are two problems with what you are describing:
> > >
> > > #1 We are intending to use IO45 as an INPUT of the position of your
> > >Manual/Auto switch.  Adding a switch between JP7 Pin6 (IO45) and JP7 Pin1
> > >(3.3V) will indeed force the pin high when the switch is closed, but when the
>
> > >switch opens the pin will float and not necessarily go low.A (~1K Ohm) pull
> >
> > >down resistor should be added to hold the pin low when the switch is
> >open. 
> >
> > >Alternatively the first 8 I/O pins on JP4 and JP6 have internal pull down
> > >resistors (150 Ohms).  So if you switch to use any of those 16 inputs you
> >will
> >
> > >not need to add an external pull down resistor.
> > >
> > > #2 If you are driving an IO pin externally with a switch (or anything else)
> >you
> >
> > >should NOT select that as an OUTPUT.  This can cause a fight between KFLOP
>
> > >trying to force the pin high or low and the external device trying to force
> >the
> >
> > >pin high or low.  Whoever is stronger will win and may cause damage to the
>
> > >weaker driver. 
> > >
> > >
> > > Sorry for the long winded reply but I think we should fix these issues first
>
> > >then see where we are at.
> > >
> > > Thanks
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Wed, May 11, 2011 10:56:35 AM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > "I think you need to change your Mach3_CL_PMDX.c program to have the
> >MANUALBIT
> >
> >
> > > set to bit 45 if that is what you have a switch wired to."
> > >
> > > After i did this and flipped switch to enable manual mode(changes from
> > > ClosedLoop to OpenLoop), Kmotion bit 45 STATE toggles, i then try to move
> >axis
> >
> >
> > > with Handwheels,but Mach goes into Reset, which will not allow me to Zero
> > axis.
> > >
> > > If i go to Kmotion and toggle the bit 45 OUTPUT then i can move axis with
> > > handwheels and Mach does Not go into Reset.
> > >
> > > How do i get the bit 45 OUTPUT to toggle by using the switch on pin 6 of
> >Kflop?
> >
> > >
> > > Right now the switch only toggles the STATE of bit 45.
> > >
> > > As for Coolant pump, i got it:) Forgot that "When using the KMotion Plugin,
> >Pin
> >
> > >
> > > Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port
> > > Pins." :)
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Can you be a bit more descriptive than "doesn't work".ÃÆ'‚  How do you
> >have
> >
> > >things
> > >
> > > >
> > > > configured in Mach3?ÃÆ'‚  What are you doing?ÃÆ'‚  What do you
> >expect to
> >
> > >happen? What
> > >
> > > >
> > > > actually does happen?
> > > >
> > > > Thanks
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Wed, May 11, 2011 8:51:44 AM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÃÆ'‚ 
> > > > Changed to 45, but doesnt work. I noticed in the Digital I/O that the State
> >
> > >is
> > >
> > >
> > > > what toggles and not the Output.
> > > >
> > > > Also, i wired up coolant pump and when trying to turn pump on and off from
>
> > > >Mach,
> > > >
> > > > nothing happens. But if i toggle the bit in Kmotion then the pump turns on
>
> > >and
> > >
> > >
> > > > off.
> > > >
> > > > Troy
> > > >
> > > > --- Tom Kerekeswrote:
> > > > >
> > > > > I think you need to change your Mach3_CL_PMDX.c program to have the
> > >MANUALBIT
> > >
> > > >
> > > > > set to bit 45 if that is what you have a switch wired to.
> > > > >
> > > > > changeÃÆ'Æ'‚ÃÆ'‚ 
> > > > >
> > > > > #define MANUALBIT 47
> > > > >
> > > > > to
> > > > >
> > > > > #define MANUALBIT 45
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tue, May 10, 2011 7:11:39 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Ok. Got my Manual Mode switch wired up. But not working:( I wired one
> >side
> >
> > >of
> > >
> > > >
> > > > > switch to pin 1 of Kflop and other side to pin 6 of Kflop. In Kmotion
> > >Digital
> > >
> > > >
> > > > > I/O screen when flipping swith, the bit 45 toggles.
> > > > >
> > > > > If i toggle bit 47 LED1, then manual mode enables in Mach and i can move
>
> > >axis
> > >
> > > >
> > > > > with handwheels.
> > > > > What am i missing? :)
> > > > > Thanks,
> > > > > Troy
> >
>
Group: DynoMotion Message: 1172 From: tmday7 Date: 5/25/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hay Tom,

UPDATE....

Moving on to next step, Limit Switches. I placed my C program file in my folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

I have Zaxis switch wired up and working as the C Program states. The issue i have is, after axis has Referenced and zeroed encoder, i then try and jog into Limit Switch again, but nothing happens.The axis just keeps going, as long as i hold down my jog key on keyboard.

What i expect to happen is after Reference sequence, switch should then be a Limit Switch, and when triggered, it should stop all motion and throw Mach into Reset with a Status of which limit switch has been triggered.

I will need this for all 3 axis.

Keep it simple TK ;)

Thanks,
Troy
Group: DynoMotion Message: 1174 From: tmday7 Date: 5/25/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Something else to add.... After axis is referenced and Limit Switch is triggered, throwing Mach into reset and stopping all movement, Mach has a Override Limits on the Settings page that will allow you to move axis off limit switch.
One way i can do this is moving Axis with hand wheels.But i think others would prefer to jog axis.

Hmmmm.... Seems like we did all this on the TriOnics mill, but cant remember it all.:)
Troy

--- "tmday7" wrote:
>
>
> Hay Tom,
>
> UPDATE....
>
> Moving on to next step, Limit Switches. I placed my C program file in my folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> I have Zaxis switch wired up and working as the C Program states. The issue i have is, after axis has Referenced and zeroed encoder, i then try and jog into Limit Switch again, but nothing happens.The axis just keeps going, as long as i hold down my jog key on keyboard.
>
> What i expect to happen is after Reference sequence, switch should then be a Limit Switch, and when triggered, it should stop all motion and throw Mach into Reset with a Status of which limit switch has been triggered.
>
> I will need this for all 3 axis.
>
> Keep it simple TK ;)
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1175 From: Tom Kerekes Date: 5/25/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
At the end of your reference sequence add
 
    ch0->LimitSwitchOptions=0x???????;

to enable limits.  To determine how the ???? should be set setup the Limit options for the axis on the Config Screen the convert to C Code and paste somewhere.
 
Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options depending on whether you have separate limits on both ends of travel. 
 
Regards
TK

Group: DynoMotion Message: 1178 From: tmday7 Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok. That worked. :)
Sumthinelse on this same issue. Can script be added to only allow axis jog in opposite direction of Limit Switch trip?
Example:
Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and trigger Reset and stop movement. I need to then Jog in minus direction only.

Is this doable?
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> At the end of your reference sequence add
>
> ch0->LimitSwitchOptions=0x???????;
>
> to enable limits.  To determine how the ???? should be set setup the Limit
> options for the axis on the Config Screen the convert to C Code and paste
> somewhere.
>
> Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> depending on whether you have separate limits on both ends of travel.
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wed, May 25, 2011 6:35:16 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
>
> Hay Tom,
>
> UPDATE....
>
> Moving on to next step, Limit Switches. I placed my C program file in my
> folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> I have Zaxis switch wired up and working as the C Program states. The issue i
> have is, after axis has Referenced and zeroed encoder, i then try and jog into
> Limit Switch again, but nothing happens.The axis just keeps going, as long as i
> hold down my jog key on keyboard.
>
> What i expect to happen is after Reference sequence, switch should then be a
> Limit Switch, and when triggered, it should stop all motion and throw Mach into
> Reset with a Status of which limit switch has been triggered.
>
> I will need this for all 3 axis.
>
> Keep it simple TK ;)
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1179 From: Tom Kerekes Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
That is what the "Disable Drive into Limit" option should do.  Once you hit a limit the axis will be disabled.  But you will then be able to re-initialize and enable the axes while still in the limit and the axes will remain enabled unless you attempt to move in the direction of further into the limit.
TK

 
Group: DynoMotion Message: 1180 From: tmday7 Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Thats what i have axis set as is "Disable Drive into Limit". And after i re-initialize i can jog Z in both directions with no faults.Also , after the Limit Switch has been triggered and i re-initialize then move axis off of switch, i can then jog axis back into switch again, but no disable of motor or Reset happens.
After i ReReference the axis again, then limit switch works again.
What am i missing?
Troy

--- Tom Kerekes wrote:
>
> That is what the "Disable Drive into Limit" option should do.  Once you hit a
> limit the axis will be disabled. But you will then be able to re-initialize and
> enable the axes while still in the limit and the axes will remain enabled unless
> you attempt to move in the direction of further into the limit.
>
> TK
>
>  
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, May 26, 2011 8:10:59 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Ok. That worked. :)
> Sumthinelse on this same issue. Can script be added to only allow axis jog in
> opposite direction of Limit Switch trip?
> Example:
> Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and
> trigger Reset and stop movement. I need to then Jog in minus direction only.
>
> Is this doable?
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > At the end of your reference sequence add
> >
> > ch0->LimitSwitchOptions=0x???????;
> >
> > to enable limits.  To determine how the ???? should be set setup the Limit
> > options for the axis on the Config Screen the convert to C Code and paste
> > somewhere.
> >
> > Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> > depending on whether you have separate limits on both ends of travel.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wed, May 25, 2011 6:35:16 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> >
> > Hay Tom,
> >
> > UPDATE....
> >
> > Moving on to next step, Limit Switches. I placed my C program file in my
> >
> folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> >
> > I have Zaxis switch wired up and working as the C Program states. The issue i
> > have is, after axis has Referenced and zeroed encoder, i then try and jog into
>
> > Limit Switch again, but nothing happens.The axis just keeps going, as long as i
> >
> > hold down my jog key on keyboard.
> >
> > What i expect to happen is after Reference sequence, switch should then be a
> > Limit Switch, and when triggered, it should stop all motion and throw Mach into
> >
> > Reset with a Status of which limit switch has been triggered.
> >
> > I will need this for all 3 axis.
> >
> > Keep it simple TK ;)
> >
> > Thanks,
> > Troy
> >
>
Group: DynoMotion Message: 1181 From: Tom Kerekes Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Limits are turned on and off by setting the chx->LimitSwitchOptions parameter.  What is your initialize program setting those to?
 
I looked at the files you posted to the forum and neither the Init or the Home sets them to anything other than zero.
 
TK
 
 

Group: DynoMotion Message: 1182 From: tmday7 Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ya, those programs are before the limit switch.And i dont know what to set the LimitSwitchOptions to.
What i have is 1 limit switch on the axis to use when Referancing in the + direction and to use as a Limit Switch in the + and - direction.

I have tried setting the LimitSwitchOptions in both C programs to the same 0x??????? number. But cant get it to work right.

What is the 0x??????? number i should set both C programs to?
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Limits are turned on and off by setting the chx->LimitSwitchOptions parameter. 
> What is your initialize program setting those to?
>
> I looked at the files you posted to the forum and neither the Init or the Home
> sets them to anything other than zero.
>
> TK
>
>  
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, May 26, 2011 1:16:55 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Thats what i have axis set as is "Disable Drive into Limit". And after i
> re-initialize i can jog Z in both directions with no faults.Also , after the
> Limit Switch has been triggered and i re-initialize then move axis off of
> switch, i can then jog axis back into switch again, but no disable of motor or
> Reset happens.
> After i ReReference the axis again, then limit switch works again.
> What am i missing?
> Troy
>
> --- Tom Kerekes wrote:
> >
> > That is what the "Disable Drive into Limit" option should do.  Once you hit a
>
> > limit the axis will be disabled. But you will then be able to re-initialize and
> >
> > enable the axes while still in the limit and the axes will remain enabled
> >unless
> >
> > you attempt to move in the direction of further into the limit.
> >
> > TK
> >
> >  
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, May 26, 2011 8:10:59 AM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Ok. That worked. :)
> > Sumthinelse on this same issue. Can script be added to only allow axis jog in
> > opposite direction of Limit Switch trip?
> > Example:
> > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and
> > trigger Reset and stop movement. I need to then Jog in minus direction only.
> >
> > Is this doable?
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > At the end of your reference sequence add
> > >
> > > ch0->LimitSwitchOptions=0x???????;
> > >
> > > to enable limits.  To determine how the ???? should be set setup the Limit
> > > options for the axis on the Config Screen the convert to C Code and paste
> > > somewhere.
> > >
> > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> > > depending on whether you have separate limits on both ends of travel.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > >
> > > Hay Tom,
> > >
> > > UPDATE....
> > >
> > > Moving on to next step, Limit Switches. I placed my C program file in my
> > >
> >
> folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > I have Zaxis switch wired up and working as the C Program states. The issue i
> >
> > > have is, after axis has Referenced and zeroed encoder, i then try and jog
> >into
> >
> >
> > > Limit Switch again, but nothing happens.The axis just keeps going, as long as
> >i
> >
> > >
> > > hold down my jog key on keyboard.
> > >
> > > What i expect to happen is after Reference sequence, switch should then be a
>
> > > Limit Switch, and when triggered, it should stop all motion and throw Mach
> >into
> >
> > >
> > > Reset with a Status of which limit switch has been triggered.
> > >
> > > I will need this for all 3 axis.
> > >
> > > Keep it simple TK ;)
> > >
> > > Thanks,
> > > Troy
> > >
> >
>
Group: DynoMotion Message: 1183 From: Tom Kerekes Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill

Hi Troy,

 

I don't understand this statement:

 

What i have is 1 limit switch on the axis to use when Referancing in the + direction and to use as a Limit Switch in the + and - direction.

I thought you described having different Limit inputs for both ends of travel??  If you have only one switch (or one signal) for both ends then when the switch is triggered KFLOP will assume you are in both limits and will not allow you to move either direction.

 

Anyway below is the "key" from KMotionDef.h to the hex value that defines all the Limits for an axis.  Even if you understand hexidecimal it is probably easiest to set the options on the Config/Flash screen, then push the C Code->Clipboard button to let KMotion.exe compute the value for you.  Paste the clipboard into notepad to view the result. 

 

TK

 

// Limit Switch Options

// Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit

// Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit

// Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low

// Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low

//

// Bits 4-7 Action - 0 Kill Motor Drive

// 1 Disallow drive in direction of limit

// 2 Stop movement

// Bits 16-23 Neg Limit I/O Bit number

// Bits 24-31 Pos Limit I/O Bit number



Group: DynoMotion Message: 1184 From: tmday7 Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I dont follow that at all.
I think i will just make sure that when i hit a limit switch that i jog it in the correct direction and re reference.
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> I don't understand this statement:
>  
> What i have is 1 limit switch on the axis to use when Referancing in the +
> direction and to use as a Limit Switch in the + and - direction.
>
> I thought you described having different Limit inputs for both ends of travel?? 
> If you have only one switch (or one signal) for both ends then when the switch
> is triggered KFLOP will assume you are in both limits and will not allow you to
> move either direction.
>  
> Anyway below is the "key" from KMotionDef.h to the hex value that defines all
> the Limits for an axis.  Even if you understand hexidecimal it is probably
> easiest to set the options on the Config/Flash screen, then push the C
> Code->Clipboard button to let KMotion.exe compute the value for you.  Paste the
> clipboard into notepad to view the result. 
>  
> TK
>  
> // Limit Switch Options
> // Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
> // Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
> // Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
> // Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
> //
> // Bits 4-7 Action - 0 Kill Motor Drive
> // 1 Disallow drive in direction of limit
> // 2 Stop movement
> // Bits 16-23 Neg Limit I/O Bit number
> // Bits 24-31 Pos Limit I/O Bit number
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thu, May 26, 2011 3:49:59 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Ya, those programs are before the limit switch.And i dont know what to set the
> LimitSwitchOptions to.
> What i have is 1 limit switch on the axis to use when Referancing in the +
> direction and to use as a Limit Switch in the + and - direction.
>
> I have tried setting the LimitSwitchOptions in both C programs to the same
> 0x??????? number. But cant get it to work right.
>
> What is the 0x??????? number i should set both C programs to?
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Limits are turned on and off by setting the chx->LimitSwitchOptions
> >parameter. 
> >
> > What is your initialize program setting those to?
> >
> > I looked at the files you posted to the forum and neither the Init or the Home
>
> > sets them to anything other than zero.
> >
> > TK
> >
> >  
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, May 26, 2011 1:16:55 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Thats what i have axis set as is "Disable Drive into Limit". And after i
> > re-initialize i can jog Z in both directions with no faults.Also , after the
> > Limit Switch has been triggered and i re-initialize then move axis off of
> > switch, i can then jog axis back into switch again, but no disable of motor or
>
> > Reset happens.
> > After i ReReference the axis again, then limit switch works again.
> > What am i missing?
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > That is what the "Disable Drive into Limit" option should do.  Once you
> >hit a
> >
> >
> > > limit the axis will be disabled. But you will then be able to re-initialize
> >and
> >
> > >
> > > enable the axes while still in the limit and the axes will remain enabled
> > >unless
> > >
> > > you attempt to move in the direction of further into the limit.
> > >
> > > TK
> > >
> > >  
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thu, May 26, 2011 8:10:59 AM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Ok. That worked. :)
> > > Sumthinelse on this same issue. Can script be added to only allow axis jog in
> >
> > > opposite direction of Limit Switch trip?
> > > Example:
> > > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and
>
> > > trigger Reset and stop movement. I need to then Jog in minus direction only.
> > >
> > > Is this doable?
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > At the end of your reference sequence add
> > > >
> > > > ch0->LimitSwitchOptions=0x???????;
> > > >
> > > > to enable limits.  To determine how the ???? should be set setup the
> >Limit
> >
> > > > options for the axis on the Config Screen the convert to C Code and paste
> > > > somewhere.
> > > >
> > > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> > > > depending on whether you have separate limits on both ends of travel.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÃÆ'‚ 
> > > >
> > > > Hay Tom,
> > > >
> > > > UPDATE....
> > > >
> > > > Moving on to next step, Limit Switches. I placed my C program file in my
> > > >
> > >
> >
> folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > >
> > > > I have Zaxis switch wired up and working as the C Program states. The issue
> >i
> >
> > >
> > > > have is, after axis has Referenced and zeroed encoder, i then try and jog
> > >into
> > >
> > >
> > > > Limit Switch again, but nothing happens.The axis just keeps going, as long
> >as
> >
> > >i
> > >
> > > >
> > > > hold down my jog key on keyboard.
> > > >
> > > > What i expect to happen is after Reference sequence, switch should then be
> >a
> >
> >
> > > > Limit Switch, and when triggered, it should stop all motion and throw Mach
>
> > >into
> > >
> > > >
> > > > Reset with a Status of which limit switch has been triggered.
> > > >
> > > > I will need this for all 3 axis.
> > > >
> > > > Keep it simple TK ;)
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > >
> >
>
Group: DynoMotion Message: 1185 From: tmday7 Date: 5/26/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I posted my current Home and Init file.
All axis is Referencing fine, but if a Limit Switch is triggered after Reference then a Re-reference is a must, in order for Limit Switches to stop movement if they are triggered again.

Thanks,
Troy


--- "tmday7"wrote:
>
> I dont follow that at all.
> I think i will just make sure that when i hit a limit switch that i jog it in the correct direction and re reference.
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >  
> > I don't understand this statement:
> >  
> > What i have is 1 limit switch on the axis to use when Referancing in the +
> > direction and to use as a Limit Switch in the + and - direction.
> >
> > I thought you described having different Limit inputs for both ends of travel?? 
> > If you have only one switch (or one signal) for both ends then when the switch
> > is triggered KFLOP will assume you are in both limits and will not allow you to
> > move either direction.
> >  
> > Anyway below is the "key" from KMotionDef.h to the hex value that defines all
> > the Limits for an axis.  Even if you understand hexidecimal it is probably
> > easiest to set the options on the Config/Flash screen, then push the C
> > Code->Clipboard button to let KMotion.exe compute the value for you.  Paste the
> > clipboard into notepad to view the result. 
> >  
> > TK
> >  
> > // Limit Switch Options
> > // Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
> > // Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
> > // Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
> > // Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
> > //
> > // Bits 4-7 Action - 0 Kill Motor Drive
> > // 1 Disallow drive in direction of limit
> > // 2 Stop movement
> > // Bits 16-23 Neg Limit I/O Bit number
> > // Bits 24-31 Pos Limit I/O Bit number
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thu, May 26, 2011 3:49:59 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Ya, those programs are before the limit switch.And i dont know what to set the
> > LimitSwitchOptions to.
> > What i have is 1 limit switch on the axis to use when Referancing in the +
> > direction and to use as a Limit Switch in the + and - direction.
> >
> > I have tried setting the LimitSwitchOptions in both C programs to the same
> > 0x??????? number. But cant get it to work right.
> >
> > What is the 0x??????? number i should set both C programs to?
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Limits are turned on and off by setting the chx->LimitSwitchOptions
> > >parameter. 
> > >
> > > What is your initialize program setting those to?
> > >
> > > I looked at the files you posted to the forum and neither the Init or the Home
> >
> > > sets them to anything other than zero.
> > >
> > > TK
> > >
> > >  
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thu, May 26, 2011 1:16:55 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Thats what i have axis set as is "Disable Drive into Limit". And after i
> > > re-initialize i can jog Z in both directions with no faults.Also , after the
> > > Limit Switch has been triggered and i re-initialize then move axis off of
> > > switch, i can then jog axis back into switch again, but no disable of motor or
> >
> > > Reset happens.
> > > After i ReReference the axis again, then limit switch works again.
> > > What am i missing?
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > That is what the "Disable Drive into Limit" option should do.  Once you
> > >hit a
> > >
> > >
> > > > limit the axis will be disabled. But you will then be able to re-initialize
> > >and
> > >
> > > >
> > > > enable the axes while still in the limit and the axes will remain enabled
> > > >unless
> > > >
> > > > you attempt to move in the direction of further into the limit.
> > > >
> > > > TK
> > > >
> > > >  
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 26, 2011 8:10:59 AM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Ok. That worked. :)
> > > > Sumthinelse on this same issue. Can script be added to only allow axis jog in
> > >
> > > > opposite direction of Limit Switch trip?
> > > > Example:
> > > > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and
> >
> > > > trigger Reset and stop movement. I need to then Jog in minus direction only.
> > > >
> > > > Is this doable?
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > At the end of your reference sequence add
> > > > >
> > > > > ch0->LimitSwitchOptions=0x???????;
> > > > >
> > > > > to enable limits.  To determine how the ???? should be set setup the
> > >Limit
> > >
> > > > > options for the axis on the Config Screen the convert to C Code and paste
> > > > > somewhere.
> > > > >
> > > > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> > > > > depending on whether you have separate limits on both ends of travel.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > ÃÆ'‚ 
> > > > >
> > > > > Hay Tom,
> > > > >
> > > > > UPDATE....
> > > > >
> > > > > Moving on to next step, Limit Switches. I placed my C program file in my
> > > > >
> > > >
> > >
> > folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > >
> > > > > I have Zaxis switch wired up and working as the C Program states. The issue
> > >i
> > >
> > > >
> > > > > have is, after axis has Referenced and zeroed encoder, i then try and jog
> > > >into
> > > >
> > > >
> > > > > Limit Switch again, but nothing happens.The axis just keeps going, as long
> > >as
> > >
> > > >i
> > > >
> > > > >
> > > > > hold down my jog key on keyboard.
> > > > >
> > > > > What i expect to happen is after Reference sequence, switch should then be
> > >a
> > >
> > >
> > > > > Limit Switch, and when triggered, it should stop all motion and throw Mach
> >
> > > >into
> > > >
> > > > >
> > > > > Reset with a Status of which limit switch has been triggered.
> > > > >
> > > > > I will need this for all 3 axis.
> > > > >
> > > > > Keep it simple TK ;)
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1186 From: tmday7 Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I changed Init C program, as the InitStepDir3Axis(edit).c program would not do the Manual Mode correctly. Iam missing something in code.

So iam now using Mach3_CL_PMDX-125.c, but i had to comment out the #define FEEDHOLDBIT 7 and the corresponding code for it, because iam using bit 7 as my limit switch on Y axis.

Can you tell me what iam missing in the InitStepDir3Axis(edit).c program, that is not letting the Manual Mode work?

Was also wondering if some code can be added to De-Reference Mach3 when a Limit Switch is triggered?
This would cause the user to have to Reference machine after Limit Switch has been triggered.

Thanks,
Troy

--- "tmday7" wrote:
>
> I posted my current Home and Init file.
> All axis is Referencing fine, but if a Limit Switch is triggered after Reference then a Re-reference is a must, in order for Limit Switches to stop movement if they are triggered again.
>
> Thanks,
> Troy
>
>
> --- "tmday7"wrote:
> >
> > I dont follow that at all.
> > I think i will just make sure that when i hit a limit switch that i jog it in the correct direction and re reference.
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > I don't understand this statement:
> > >  
> > > What i have is 1 limit switch on the axis to use when Referancing in the +
> > > direction and to use as a Limit Switch in the + and - direction.
> > >
> > > I thought you described having different Limit inputs for both ends of travel?? 
> > > If you have only one switch (or one signal) for both ends then when the switch
> > > is triggered KFLOP will assume you are in both limits and will not allow you to
> > > move either direction.
> > >  
> > > Anyway below is the "key" from KMotionDef.h to the hex value that defines all
> > > the Limits for an axis.  Even if you understand hexidecimal it is probably
> > > easiest to set the options on the Config/Flash screen, then push the C
> > > Code->Clipboard button to let KMotion.exe compute the value for you.  Paste the
> > > clipboard into notepad to view the result. 
> > >  
> > > TK
> > >  
> > > // Limit Switch Options
> > > // Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
> > > // Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
> > > // Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
> > > // Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
> > > //
> > > // Bits 4-7 Action - 0 Kill Motor Drive
> > > // 1 Disallow drive in direction of limit
> > > // 2 Stop movement
> > > // Bits 16-23 Neg Limit I/O Bit number
> > > // Bits 24-31 Pos Limit I/O Bit number
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thu, May 26, 2011 3:49:59 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Ya, those programs are before the limit switch.And i dont know what to set the
> > > LimitSwitchOptions to.
> > > What i have is 1 limit switch on the axis to use when Referancing in the +
> > > direction and to use as a Limit Switch in the + and - direction.
> > >
> > > I have tried setting the LimitSwitchOptions in both C programs to the same
> > > 0x??????? number. But cant get it to work right.
> > >
> > > What is the 0x??????? number i should set both C programs to?
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Limits are turned on and off by setting the chx->LimitSwitchOptions
> > > >parameter. 
> > > >
> > > > What is your initialize program setting those to?
> > > >
> > > > I looked at the files you posted to the forum and neither the Init or the Home
> > >
> > > > sets them to anything other than zero.
> > > >
> > > > TK
> > > >
> > > >  
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 26, 2011 1:16:55 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Thats what i have axis set as is "Disable Drive into Limit". And after i
> > > > re-initialize i can jog Z in both directions with no faults.Also , after the
> > > > Limit Switch has been triggered and i re-initialize then move axis off of
> > > > switch, i can then jog axis back into switch again, but no disable of motor or
> > >
> > > > Reset happens.
> > > > After i ReReference the axis again, then limit switch works again.
> > > > What am i missing?
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > That is what the "Disable Drive into Limit" option should do.  Once you
> > > >hit a
> > > >
> > > >
> > > > > limit the axis will be disabled. But you will then be able to re-initialize
> > > >and
> > > >
> > > > >
> > > > > enable the axes while still in the limit and the axes will remain enabled
> > > > >unless
> > > > >
> > > > > you attempt to move in the direction of further into the limit.
> > > > >
> > > > > TK
> > > > >
> > > > >  
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thu, May 26, 2011 8:10:59 AM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > >  
> > > > > Ok. That worked. :)
> > > > > Sumthinelse on this same issue. Can script be added to only allow axis jog in
> > > >
> > > > > opposite direction of Limit Switch trip?
> > > > > Example:
> > > > > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and
> > >
> > > > > trigger Reset and stop movement. I need to then Jog in minus direction only.
> > > > >
> > > > > Is this doable?
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >
> > > > > > At the end of your reference sequence add
> > > > > >
> > > > > > ch0->LimitSwitchOptions=0x???????;
> > > > > >
> > > > > > to enable limits.  To determine how the ???? should be set setup the
> > > >Limit
> > > >
> > > > > > options for the axis on the Config Screen the convert to C Code and paste
> > > > > > somewhere.
> > > > > >
> > > > > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> > > > > > depending on whether you have separate limits on both ends of travel.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > > ÃÆ'‚ 
> > > > > >
> > > > > > Hay Tom,
> > > > > >
> > > > > > UPDATE....
> > > > > >
> > > > > > Moving on to next step, Limit Switches. I placed my C program file in my
> > > > > >
> > > > >
> > > >
> > > folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > > >
> > > > > > I have Zaxis switch wired up and working as the C Program states. The issue
> > > >i
> > > >
> > > > >
> > > > > > have is, after axis has Referenced and zeroed encoder, i then try and jog
> > > > >into
> > > > >
> > > > >
> > > > > > Limit Switch again, but nothing happens.The axis just keeps going, as long
> > > >as
> > > >
> > > > >i
> > > > >
> > > > > >
> > > > > > hold down my jog key on keyboard.
> > > > > >
> > > > > > What i expect to happen is after Reference sequence, switch should then be
> > > >a
> > > >
> > > >
> > > > > > Limit Switch, and when triggered, it should stop all motion and throw Mach
> > >
> > > > >into
> > > > >
> > > > > >
> > > > > > Reset with a Status of which limit switch has been triggered.
> > > > > >
> > > > > > I will need this for all 3 axis.
> > > > > >
> > > > > > Keep it simple TK ;)
> > > > > >
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1188 From: tmday7 Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Also found out that when i click the Reset button in Mach3 that i must Re-Reference all axis so Limit Switches then work as Limit Switches.

--- "tmday7"wrote:
>
> I changed Init C program, as the InitStepDir3Axis(edit).c program would not do the Manual Mode correctly. Iam missing something in code.
>
> So iam now using Mach3_CL_PMDX-125.c, but i had to comment out the #define FEEDHOLDBIT 7 and the corresponding code for it, because iam using bit 7 as my limit switch on Y axis.
>
> Can you tell me what iam missing in the InitStepDir3Axis(edit).c program, that is not letting the Manual Mode work?
>
> Was also wondering if some code can be added to De-Reference Mach3 when a Limit Switch is triggered?
> This would cause the user to have to Reference machine after Limit Switch has been triggered.
>
> Thanks,
> Troy
>
> --- "tmday7" wrote:
> >
> > I posted my current Home and Init file.
> > All axis is Referencing fine, but if a Limit Switch is triggered after Reference then a Re-reference is a must, in order for Limit Switches to stop movement if they are triggered again.
> >
> > Thanks,
> > Troy
> >
> >
> > --- "tmday7"wrote:
> > >
> > > I dont follow that at all.
> > > I think i will just make sure that when i hit a limit switch that i jog it in the correct direction and re reference.
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >  
> > > > I don't understand this statement:
> > > >  
> > > > What i have is 1 limit switch on the axis to use when Referancing in the +
> > > > direction and to use as a Limit Switch in the + and - direction.
> > > >
> > > > I thought you described having different Limit inputs for both ends of travel?? 
> > > > If you have only one switch (or one signal) for both ends then when the switch
> > > > is triggered KFLOP will assume you are in both limits and will not allow you to
> > > > move either direction.
> > > >  
> > > > Anyway below is the "key" from KMotionDef.h to the hex value that defines all
> > > > the Limits for an axis.  Even if you understand hexidecimal it is probably
> > > > easiest to set the options on the Config/Flash screen, then push the C
> > > > Code->Clipboard button to let KMotion.exe compute the value for you.  Paste the
> > > > clipboard into notepad to view the result. 
> > > >  
> > > > TK
> > > >  
> > > > // Limit Switch Options
> > > > // Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
> > > > // Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
> > > > // Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
> > > > // Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
> > > > //
> > > > // Bits 4-7 Action - 0 Kill Motor Drive
> > > > // 1 Disallow drive in direction of limit
> > > > // 2 Stop movement
> > > > // Bits 16-23 Neg Limit I/O Bit number
> > > > // Bits 24-31 Pos Limit I/O Bit number
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 26, 2011 3:49:59 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Ya, those programs are before the limit switch.And i dont know what to set the
> > > > LimitSwitchOptions to.
> > > > What i have is 1 limit switch on the axis to use when Referancing in the +
> > > > direction and to use as a Limit Switch in the + and - direction.
> > > >
> > > > I have tried setting the LimitSwitchOptions in both C programs to the same
> > > > 0x??????? number. But cant get it to work right.
> > > >
> > > > What is the 0x??????? number i should set both C programs to?
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > Limits are turned on and off by setting the chx->LimitSwitchOptions
> > > > >parameter. 
> > > > >
> > > > > What is your initialize program setting those to?
> > > > >
> > > > > I looked at the files you posted to the forum and neither the Init or the Home
> > > >
> > > > > sets them to anything other than zero.
> > > > >
> > > > > TK
> > > > >
> > > > >  
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thu, May 26, 2011 1:16:55 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > >  
> > > > > Thats what i have axis set as is "Disable Drive into Limit". And after i
> > > > > re-initialize i can jog Z in both directions with no faults.Also , after the
> > > > > Limit Switch has been triggered and i re-initialize then move axis off of
> > > > > switch, i can then jog axis back into switch again, but no disable of motor or
> > > >
> > > > > Reset happens.
> > > > > After i ReReference the axis again, then limit switch works again.
> > > > > What am i missing?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > That is what the "Disable Drive into Limit" option should do.  Once you
> > > > >hit a
> > > > >
> > > > >
> > > > > > limit the axis will be disabled. But you will then be able to re-initialize
> > > > >and
> > > > >
> > > > > >
> > > > > > enable the axes while still in the limit and the axes will remain enabled
> > > > > >unless
> > > > > >
> > > > > > you attempt to move in the direction of further into the limit.
> > > > > >
> > > > > > TK
> > > > > >
> > > > > >  
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thu, May 26, 2011 8:10:59 AM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > >  
> > > > > > Ok. That worked. :)
> > > > > > Sumthinelse on this same issue. Can script be added to only allow axis jog in
> > > > >
> > > > > > opposite direction of Limit Switch trip?
> > > > > > Example:
> > > > > > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit switch and
> > > >
> > > > > > trigger Reset and stop movement. I need to then Jog in minus direction only.
> > > > > >
> > > > > > Is this doable?
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > --- Tom Kerekes wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > At the end of your reference sequence add
> > > > > > >
> > > > > > > ch0->LimitSwitchOptions=0x???????;
> > > > > > >
> > > > > > > to enable limits.  To determine how the ???? should be set setup the
> > > > >Limit
> > > > >
> > > > > > > options for the axis on the Config Screen the convert to C Code and paste
> > > > > > > somewhere.
> > > > > > >
> > > > > > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit" options
> > > > > > > depending on whether you have separate limits on both ends of travel.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > > ÃÆ'‚ 
> > > > > > >
> > > > > > > Hay Tom,
> > > > > > >
> > > > > > > UPDATE....
> > > > > > >
> > > > > > > Moving on to next step, Limit Switches. I placed my C program file in my
> > > > > > >
> > > > > >
> > > > >
> > > > folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > > > >
> > > > > > > I have Zaxis switch wired up and working as the C Program states. The issue
> > > > >i
> > > > >
> > > > > >
> > > > > > > have is, after axis has Referenced and zeroed encoder, i then try and jog
> > > > > >into
> > > > > >
> > > > > >
> > > > > > > Limit Switch again, but nothing happens.The axis just keeps going, as long
> > > > >as
> > > > >
> > > > > >i
> > > > > >
> > > > > > >
> > > > > > > hold down my jog key on keyboard.
> > > > > > >
> > > > > > > What i expect to happen is after Reference sequence, switch should then be
> > > > >a
> > > > >
> > > > >
> > > > > > > Limit Switch, and when triggered, it should stop all motion and throw Mach
> > > >
> > > > > >into
> > > > > >
> > > > > > >
> > > > > > > Reset with a Status of which limit switch has been triggered.
> > > > > > >
> > > > > > > I will need this for all 3 axis.
> > > > > > >
> > > > > > > Keep it simple TK ;)
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1189 From: Tom Kerekes Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
I extracted and copied the 3 lines you added to the Home/Reference C program below.
 
Can you find your mistakes?
 
ch0->LimitSwitchOptions=0x606000f; 
ch1->LimitSwitchOptions=0x707001f;
ch2->LimitSwitchOptions=0xf0f001f8;

 

Notice the extra "8".  C programs are very picky.  Adding or removing one character can totally change the meaning.

 

I see that your limit inputs are specified as 6,7 and 15 (hexidecimal f is equal to 15 decimal) and that you are specifying the same bit for both ends of travel.  As I mentioned in the previous email if the same input is used for both ends you can not use action mode 1 (Disallow drive in direction of limit) because both directions will be disabled.

 

The correct values would be

 

ch0->LimitSwitchOptions=0x606000f; 
ch1->LimitSwitchOptions=0x707000f;
ch2->LimitSwitchOptions=0xf0f000f;

Regards

TK

 


Group: DynoMotion Message: 1190 From: Tom Kerekes Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,

 

You basically made another two characters mistake that totally broke the InitStepDir3Axis(edit).c program.  You deleted some curly brackets { } by mistake.

 

It is important to fully understand the function of curly brackets.   They are used to group multiple statements into a single object so those statements can be the object of either a "for" loop, or "while" loop, or "if" statement.  By default a loop or "if" will only apply to the next statement.   So for example to form a forever loop to do a single statement such as X=Y one could code:

 

for (;;) // loop forever

   X=Y;

 

Also notice that although not necessary for the computer, but only for human readers, the person writing the code will normally indent the statement X=Y to indicate that it "belongs" as the object of the loop.

 

If we want to loop multiple statements it is necessary to group all the statements together with curly brackets.  So a forever loop to do both X=Y and A=B would be coded like:

 

 

for (;;) // loop forever

{

  X=Y;  // these two statements are looped

  A=B;

}

 

 

Notice how the two lines were indented to show how they belong to the curly brackets and the for statement.   A program with the exact same functionality could also be written as: 

 

     for (;;) { // loop forever

                                X=Y;

A=B;

    }

 

But this would be harder for a human reader to understand.  So please when changing C programs try to follow the etiquette of indentation to help others (as well as yourself) read your code.  See here for more info (most programmers prefer to use the Allman style, but any style as long as consistant will be helpful):

 

http://en.wikipedia.org/wiki/Indent_style

 

 

When you modified the Init program to delete the feedhold code you removed some curly brackets that changed:

 

 

this big loop of stuff

 

for (;;)

{

    Estop = ReadBit(ESTOPBIT);
    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

}

 

 

to only the ReadBit is now looped

 

for (;;)
Estop = ReadBit(ESTOPBIT);
 

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

    Many lines of stuff

 

 

Does this make any sense?  I know the C language appears very cryptic to a beginner.  But once you understand a few rules of syntax it quickly becomes more readable.

 

So put the curly brackets back around all the code that does the Manual mode functions.

 

TK

 

 


Group: DynoMotion Message: 1191 From: tmday7 Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Huh... I dont know how I got the extra number in there, as i copied and paste, but it was still working. :)

I changed the values as you said, and all axis work the same as how i had it with other LimitSwitch Options. But iam keeping them as you said below.

Would a LimitSwitchOption be set in the Init c program? I dont have any. I only have them set in the Home c program.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> I extracted and copied the 3 lines you added to the Home/Reference C program
> below.
>
> Can you find your mistakes?
>
> ch0->LimitSwitchOptions=0x606000f; 
> ch1->LimitSwitchOptions=0x707001f;
> ch2->LimitSwitchOptions=0xf0f001f8;
>
>  
> Notice the extra "8".  C programs are very picky.  Adding or removing one
> character can totally change the meaning.
>  
> I see that your limit inputs are specified as 6,7 and 15 (hexidecimal f is equal
> to 15 decimal) and that you are specifying the same bit for both ends of
> travel.  As I mentioned in the previous email if the same input is used for both
> ends you can not use action mode 1 (Disallow drive in direction of limit)
> because both directions will be disabled.
>  
> The correct values would be
>  
> ch0->LimitSwitchOptions=0x606000f; 
> ch1->LimitSwitchOptions=0x707000f;
> ch2->LimitSwitchOptions=0xf0f000f;
>
> Regards
> TK
>  
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 27, 2011 8:08:57 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> I changed Init C program, as the InitStepDir3Axis(edit).c program would not do
> the Manual Mode correctly. Iam missing something in code.
>
> So iam now using Mach3_CL_PMDX-125.c, but i had to comment out the #define
> FEEDHOLDBIT 7 and the corresponding code for it, because iam using bit 7 as my
> limit switch on Y axis.
>
>
> Can you tell me what iam missing in the InitStepDir3Axis(edit).c program, that
> is not letting the Manual Mode work?
>
> Was also wondering if some code can be added to De-Reference Mach3 when a Limit
> Switch is triggered?
>
> This would cause the user to have to Reference machine after Limit Switch has
> been triggered.
>
> Thanks,
> Troy
>
> --- "tmday7" wrote:
> >
> > I posted my current Home and Init file.
> > All axis is Referencing fine, but if a Limit Switch is triggered after
> >Reference then a Re-reference is a must, in order for Limit Switches to stop
> >movement if they are triggered again.
> >
> > Thanks,
> > Troy
> >
> >
> > --- "tmday7"wrote:
> > >
> > > I dont follow that at all.
> > > I think i will just make sure that when i hit a limit switch that i jog it in
> >the correct direction and re reference.
> >
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >  
> > > > I don't understand this statement:
> > > >  
> > > > What i have is 1 limit switch on the axis to use when Referancing in the +
>
> > > > direction and to use as a Limit Switch in the + and - direction.
> > > >
> > > > I thought you described having different Limit inputs for both ends of
> >travel?? 
> >
> > > > If you have only one switch (or one signal) for both ends then when the
> >switch
> >
> > > > is triggered KFLOP will assume you are in both limits and will not allow
> >you to
> >
> > > > move either direction.
> > > >  
> > > > Anyway below is the "key" from KMotionDef.h to the hex value that defines
> >all
> >
> > > > the Limits for an axis.  Even if you understand hexidecimal it is probably
> >
> > > > easiest to set the options on the Config/Flash screen, then push the C
> > > > Code->Clipboard button to let KMotion.exe compute the value for you. 
> >Paste the
> >
> > > > clipboard into notepad to view the result. 
> > > >  
> > > > TK
> > > >  
> > > > // Limit Switch Options
> > > > // Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
> > > > // Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
> > > > // Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
> > > > // Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
> > > > //
> > > > // Bits 4-7 Action - 0 Kill Motor Drive
> > > > // 1 Disallow drive in direction of limit
> > > > // 2 Stop movement
> > > > // Bits 16-23 Neg Limit I/O Bit number
> > > > // Bits 24-31 Pos Limit I/O Bit number
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 26, 2011 3:49:59 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Ya, those programs are before the limit switch.And i dont know what to set
> >the
> >
> > > > LimitSwitchOptions to.
> > > > What i have is 1 limit switch on the axis to use when Referancing in the +
>
> > > > direction and to use as a Limit Switch in the + and - direction.
> > > >
> > > > I have tried setting the LimitSwitchOptions in both C programs to the same
>
> > > > 0x??????? number. But cant get it to work right.
> > > >
> > > > What is the 0x??????? number i should set both C programs to?
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > Limits are turned on and off by setting the chx->LimitSwitchOptions
> > > > >parameter. 
> > > > >
> > > > > What is your initialize program setting those to?
> > > > >
> > > > > I looked at the files you posted to the forum and neither the Init or the
> >Home
> >
> > > >
> > > > > sets them to anything other than zero.
> > > > >
> > > > > TK
> > > > >
> > > > >  
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thu, May 26, 2011 1:16:55 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > >  
> > > > > Thats what i have axis set as is "Disable Drive into Limit". And after i
>
> > > > > re-initialize i can jog Z in both directions with no faults.Also , after
> >the
> >
> > > > > Limit Switch has been triggered and i re-initialize then move axis off of
> >
> > > > > switch, i can then jog axis back into switch again, but no disable of
> >motor or
> >
> > > >
> > > > > Reset happens.
> > > > > After i ReReference the axis again, then limit switch works again.
> > > > > What am i missing?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > That is what the "Disable Drive into Limit" option should do.ÃÆ'‚ 
> >Once you
> >
> > > > >hit a
> > > > >
> > > > >
> > > > > > limit the axis will be disabled. But you will then be able to
> >re-initialize
> >
> > > > >and
> > > > >
> > > > > >
> > > > > > enable the axes while still in the limit and the axes will remain
> >enabled
> >
> > > > > >unless
> > > > > >
> > > > > > you attempt to move in the direction of further into the limit.
> > > > > >
> > > > > > TK
> > > > > >
> > > > > > ÃÆ'‚ 
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thu, May 26, 2011 8:10:59 AM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > > ÃÆ'‚ 
> > > > > > Ok. That worked. :)
> > > > > > Sumthinelse on this same issue. Can script be added to only allow axis
> >jog in
> >
> > > > >
> > > > > > opposite direction of Limit Switch trip?
> > > > > > Example:
> > > > > > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit
> >switch and
> >
> > > >
> > > > > > trigger Reset and stop movement. I need to then Jog in minus direction
> >only.
> > > > > >
> > > > > > Is this doable?
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > --- Tom Kerekes wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > At the end of your reference sequence add
> > > > > > >
> > > > > > > ch0->LimitSwitchOptions=0x???????;
> > > > > > >
> > > > > > > to enable limits.ÃÆ'‚  To determine how the ???? should be set
> >setup the
> >
> > > > >Limit
> > > > >
> > > > > > > options for the axis on the Config Screen the convert to C Code and
> >paste
> >
> > > > > > > somewhere.
> > > > > > >
> > > > > > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit"
> >options
> >
> > > > > > > depending on whether you have separate limits on both ends of
> travel.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > > >
> > > > > > > Hay Tom,
> > > > > > >
> > > > > > > UPDATE....
> > > > > > >
> > > > > > > Moving on to next step, Limit Switches. I placed my C program file in
> >my
> >
> > > > > > >
> > > > > >
> > > > >
> > > >
> >folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > > > >
> > > > > > > I have Zaxis switch wired up and working as the C Program states. The
> >issue
> >
> > > > >i
> > > > >
> > > > > >
> > > > > > > have is, after axis has Referenced and zeroed encoder, i then try and
> >jog
> >
> > > > > >into
> > > > > >
> > > > > >
> > > > > > > Limit Switch again, but nothing happens.The axis just keeps going, as
> >long
> >
> > > > >as
> > > > >
> > > > > >i
> > > > > >
> > > > > > >
> > > > > > > hold down my jog key on keyboard.
> > > > > > >
> > > > > > > What i expect to happen is after Reference sequence, switch should
> >then be
> >
> > > > >a
> > > > >
> > > > >
> > > > > > > Limit Switch, and when triggered, it should stop all motion and throw
> >Mach
> >
> > > >
> > > > > >into
> > > > > >
> > > > > > >
> > > > > > > Reset with a Status of which limit switch has been triggered.
> > > > > > >
> > > > > > > I will need this for all 3 axis.
> > > > > > >
> > > > > > > Keep it simple TK ;)
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1192 From: Tom Kerekes Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Yes.  That is why the limits are enabled after you home.
 
TK


Group: DynoMotion Message: 1197 From: tmday7 Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I can follow that a little better :) I have the Manual Mode working again with a new Init c program 'Mach3_CL_PMDX-125(Version2).c', its in the folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

Thanks,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> You basically made another two characters mistake that totally broke the
> InitStepDir3Axis(edit).c program.  You deleted some curly brackets { } by
> mistake.
>  
> It is important to fully understand the function of curly brackets.   They are
> used to group multiple statements into a single object so those statements can
> be the object of either a "for" loop, or "while" loop, or "if" statement.  By
> default a loop or "if" will only apply to the next statement.   So for example
> to form a forever loop to do a single statement such as X=Y one could code:
>  
> for (;;) // loop forever
>    X=Y;
>  
> Also notice that although not necessary for the computer, but only for human
> readers, the person writing the code will normally indent the statement X=Y to
> indicate that it "belongs" as the object of the loop.
>  
> If we want to loop multiple statements it is necessary to group all the
> statements together with curly brackets.  So a forever loop to do both X=Y and
> A=B would be coded like:
>  
>  
> for (;;) // loop forever
> {
>   X=Y;  // these two statements are looped
>   A=B;
> }
>  
>  
> Notice how the two lines were indented to show how they belong to the curly
> brackets and the for statement.   A program with the exact same functionality
> could also be written as: 
>       for (;;) { // loop forever
>                                 X=Y;
> A=B;
>     }
>  
> But this would be harder for a human reader to understand.  So please when
> changing C programs try to follow the etiquette of indentation to help others
> (as well as yourself) read your code.  See here for more info (most programmers
> prefer to use the Allman style, but any style as long as consistant will be
> helpful):
>  
> http://en.wikipedia.org/wiki/Indent_style
>  
>  
> When you modified the Init program to delete the feedhold code you removed some
> curly brackets that changed:
>  
>  
> this big loop of stuff
>  
> for (;;)
> {    Estop = ReadBit(ESTOPBIT);
>     Many lines of stuff    Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
> }
>  
>  
> to only the ReadBit is now looped
>  
> for (;;)
> Estop = ReadBit(ESTOPBIT);
>  
>  
>  
> Does this make any sense?  I know the C language appears very cryptic to a
> beginner.  But once you understand a few rules of syntax it quickly becomes more
> readable.
>  
> So put the curly brackets back around all the code that does the Manual mode
> functions.
>  
> TK
>  
>     Many lines of stuff    Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>     Many lines of stuff
>  
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 27, 2011 8:08:57 AM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> I changed Init C program, as the InitStepDir3Axis(edit).c program would not do
> the Manual Mode correctly. Iam missing something in code.
>
> So iam now using Mach3_CL_PMDX-125.c, but i had to comment out the #define
> FEEDHOLDBIT 7 and the corresponding code for it, because iam using bit 7 as my
> limit switch on Y axis.
>
>
> Can you tell me what iam missing in the InitStepDir3Axis(edit).c program, that
> is not letting the Manual Mode work?
>
> Was also wondering if some code can be added to De-Reference Mach3 when a Limit
> Switch is triggered?
>
> This would cause the user to have to Reference machine after Limit Switch has
> been triggered.
>
> Thanks,
> Troy
>
> --- "tmday7" wrote:
> >
> > I posted my current Home and Init file.
> > All axis is Referencing fine, but if a Limit Switch is triggered after
> >Reference then a Re-reference is a must, in order for Limit Switches to stop
> >movement if they are triggered again.
> >
> > Thanks,
> > Troy
> >
> >
> > --- "tmday7"wrote:
> > >
> > > I dont follow that at all.
> > > I think i will just make sure that when i hit a limit switch that i jog it in
> >the correct direction and re reference.
> >
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >  
> > > > I don't understand this statement:
> > > >  
> > > > What i have is 1 limit switch on the axis to use when Referancing in the +
>
> > > > direction and to use as a Limit Switch in the + and - direction.
> > > >
> > > > I thought you described having different Limit inputs for both ends of
> >travel?? 
> >
> > > > If you have only one switch (or one signal) for both ends then when the
> >switch
> >
> > > > is triggered KFLOP will assume you are in both limits and will not allow
> >you to
> >
> > > > move either direction.
> > > >  
> > > > Anyway below is the "key" from KMotionDef.h to the hex value that defines
> >all
> >
> > > > the Limits for an axis.  Even if you understand hexidecimal it is probably
> >
> > > > easiest to set the options on the Config/Flash screen, then push the C
> > > > Code->Clipboard button to let KMotion.exe compute the value for you. 
> >Paste the
> >
> > > > clipboard into notepad to view the result. 
> > > >  
> > > > TK
> > > >  
> > > > // Limit Switch Options
> > > > // Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
> > > > // Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
> > > > // Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
> > > > // Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
> > > > //
> > > > // Bits 4-7 Action - 0 Kill Motor Drive
> > > > // 1 Disallow drive in direction of limit
> > > > // 2 Stop movement
> > > > // Bits 16-23 Neg Limit I/O Bit number
> > > > // Bits 24-31 Pos Limit I/O Bit number
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thu, May 26, 2011 3:49:59 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Ya, those programs are before the limit switch.And i dont know what to set
> >the
> >
> > > > LimitSwitchOptions to.
> > > > What i have is 1 limit switch on the axis to use when Referancing in the +
>
> > > > direction and to use as a Limit Switch in the + and - direction.
> > > >
> > > > I have tried setting the LimitSwitchOptions in both C programs to the same
>
> > > > 0x??????? number. But cant get it to work right.
> > > >
> > > > What is the 0x??????? number i should set both C programs to?
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > Limits are turned on and off by setting the chx->LimitSwitchOptions
> > > > >parameter. 
> > > > >
> > > > > What is your initialize program setting those to?
> > > > >
> > > > > I looked at the files you posted to the forum and neither the Init or the
> >Home
> >
> > > >
> > > > > sets them to anything other than zero.
> > > > >
> > > > > TK
> > > > >
> > > > >  
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thu, May 26, 2011 1:16:55 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > >  
> > > > > Thats what i have axis set as is "Disable Drive into Limit". And after i
>
> > > > > re-initialize i can jog Z in both directions with no faults.Also , after
> >the
> >
> > > > > Limit Switch has been triggered and i re-initialize then move axis off of
> >
> > > > > switch, i can then jog axis back into switch again, but no disable of
> >motor or
> >
> > > >
> > > > > Reset happens.
> > > > > After i ReReference the axis again, then limit switch works again.
> > > > > What am i missing?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > That is what the "Disable Drive into Limit" option should do.ÃÆ'‚ 
> >Once you
> >
> > > > >hit a
> > > > >
> > > > >
> > > > > > limit the axis will be disabled. But you will then be able to
> >re-initialize
> >
> > > > >and
> > > > >
> > > > > >
> > > > > > enable the axes while still in the limit and the axes will remain
> >enabled
> >
> > > > > >unless
> > > > > >
> > > > > > you attempt to move in the direction of further into the limit.
> > > > > >
> > > > > > TK
> > > > > >
> > > > > > ÃÆ'‚ 
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thu, May 26, 2011 8:10:59 AM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > > ÃÆ'‚ 
> > > > > > Ok. That worked. :)
> > > > > > Sumthinelse on this same issue. Can script be added to only allow axis
> >jog in
> >
> > > > >
> > > > > > opposite direction of Limit Switch trip?
> > > > > > Example:
> > > > > > Z axis is Referanced at Z+, then i Jog axis manualy into Z+ Limit
> >switch and
> >
> > > >
> > > > > > trigger Reset and stop movement. I need to then Jog in minus direction
> >only.
> > > > > >
> > > > > > Is this doable?
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > --- Tom Kerekes wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > At the end of your reference sequence add
> > > > > > >
> > > > > > > ch0->LimitSwitchOptions=0x???????;
> > > > > > >
> > > > > > > to enable limits.ÃÆ'‚  To determine how the ???? should be set
> >setup the
> >
> > > > >Limit
> > > > >
> > > > > > > options for the axis on the Config Screen the convert to C Code and
> >paste
> >
> > > > > > > somewhere.
> > > > > > >
> > > > > > > Use the "Kiil Motor Drive" option or "Disable Drive into Limit"
> >options
> >
> > > > > > > depending on whether you have separate limits on both ends of
> travel.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Wed, May 25, 2011 6:35:16 PM
> > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > > >
> > > > > > > Hay Tom,
> > > > > > >
> > > > > > > UPDATE....
> > > > > > >
> > > > > > > Moving on to next step, Limit Switches. I placed my C program file in
> >my
> >
> > > > > > >
> > > > > >
> > > > >
> > > >
> >folder...http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > > > >
> > > > > > > I have Zaxis switch wired up and working as the C Program states. The
> >issue
> >
> > > > >i
> > > > >
> > > > > >
> > > > > > > have is, after axis has Referenced and zeroed encoder, i then try and
> >jog
> >
> > > > > >into
> > > > > >
> > > > > >
> > > > > > > Limit Switch again, but nothing happens.The axis just keeps going, as
> >long
> >
> > > > >as
> > > > >
> > > > > >i
> > > > > >
> > > > > > >
> > > > > > > hold down my jog key on keyboard.
> > > > > > >
> > > > > > > What i expect to happen is after Reference sequence, switch should
> >then be
> >
> > > > >a
> > > > >
> > > > >
> > > > > > > Limit Switch, and when triggered, it should stop all motion and throw
> >Mach
> >
> > > >
> > > > > >into
> > > > > >
> > > > > > >
> > > > > > > Reset with a Status of which limit switch has been triggered.
> > > > > > >
> > > > > > > I will need this for all 3 axis.
> > > > > > >
> > > > > > > Keep it simple TK ;)
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1198 From: tmday7 Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I tried putting the same LimitSwitchOptions in both the Home C and Init programs, but when i reference a axis and it triggers switch, it disables axis and throws Mach into Reset.

If i only have the LimitSwitchOptions set in the Home C program then it will Reference correctly.

Should it not work this away?
Troy

--- Tom Kerekes wrote:
>
> Yes.  That is why the limits are enabled after you home.
>
> TK
>
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 27, 2011 2:47:14 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> Huh... I dont know how I got the extra number in there, as i copied and paste,
> but it was still working. :)
>
> I changed the values as you said, and all axis work the same as how i had it
> with other LimitSwitch Options. But iam keeping them as you said below.
>
> Would a LimitSwitchOption be set in the Init c program? I dont have any. I only
> have them set in the Home c program.
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1199 From: Tom Kerekes Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Ahh yes if an input is going to be used as a dual purpose Home and Limit then we must disable Limits while Homing.
 
Set the LimitSwithOptions to zero at the beginning of the Home process and restore the proper value after homing and after moving back inside the limit switch. 
Eventually we might get this :}
 
TK

Group: DynoMotion Message: 1200 From: tmday7 Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I think i have it for before and after home, but how do i do it after moving back inside the limit switch?

if (flags & 4)
{
ch2->LimitSwitchOptions=0x00000000; // disable limits
DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);

Jog(Z,10000); // start moving
while (ReadBit(15)) ; // wait for switch (input #15) to change
Jog(Z,0); // StopMotion

while(!CheckDone(Z)) ;

Jog(Z,-3000); // start moving
while (!ReadBit(15)) ; // wait for switch (input #15) to change
Jog(Z,0); // StopMotion

while(!CheckDone(Z)) ;
Delay_sec(.25);

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);
Jog(Z,-3000);
Move(Z,-500);

while(!CheckDone(Z)) ;
Delay_sec(.25);

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);
ch2->LimitSwitchOptions=0xf0f000f;
}
}


Troy


---Tom Kerekes wrote:
>
> Hi Troy,
>
> Ahh yes if an input is going to be used as a dual purpose Home and Limit then we
> must disable Limits while Homing.
>
> Set the LimitSwithOptions to zero at the beginning of the Home process and
> restore the proper value after homing and after moving back inside the limit
> switch. 
>
> Eventually we might get this :}
>
> TK
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 27, 2011 5:13:56 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> I tried putting the same LimitSwitchOptions in both the Home C and Init
> programs, but when i reference a axis and it triggers switch, it disables axis
> and throws Mach into Reset.
>
> If i only have the LimitSwitchOptions set in the Home C program then it will
> Reference correctly.
>
> Should it not work this away?
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Yes.  That is why the limits are enabled after you home.
> >
> > TK
> >
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 27, 2011 2:47:14 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > Huh... I dont know how I got the extra number in there, as i copied and paste,
>
> > but it was still working. :)
> >
> > I changed the values as you said, and all axis work the same as how i had it
> > with other LimitSwitch Options. But iam keeping them as you said below.
> >
> > Would a LimitSwitchOption be set in the Init c program? I dont have any. I only
> >
> > have them set in the Home c program.
> >
> > Thanks,
> > Troy
> >
>
Group: DynoMotion Message: 1201 From: Tom Kerekes Date: 5/27/2011
Subject: Re: KFLOP Setup on a Mill/Drill
That looks correct to me. The sequence you have hits the switch and decelerates to a stop, reverses slowly until out of the switch, then decellerates to a stop, then moves 500 more so it should end up well inside the range of travel.
 
TK

Group: DynoMotion Message: 1202 From: tmday7 Date: 5/28/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok, i now have LimitSwitchOptions set in both C Programs and all works well, except for 1 thing, i cant jog out of limit switch once it has been triggered. I tried using Mach3s Manual Override Limits button on the Settings page, but Mach still stays in Reset until i move axis off limit switch.
Can KFLOP watch the LED of the Manual Override Limits button and then allow axis to be jogged? Or sumthin like that.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> That looks correct to me. The sequence you have hits the switch and decelerates
> to a stop, reverses slowly until out of the switch, then decellerates to a stop,
> then moves 500 more so it should end up well inside the range of travel.
>
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 27, 2011 6:03:00 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> I think i have it for before and after home, but how do i do it after moving
> back inside the limit switch?
>
> if (flags & 4)
> {
> ch2->LimitSwitchOptions=0x00000000; // disable limits
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
>
> Jog(Z,10000); // start moving
> while (ReadBit(15)) ; // wait for switch (input #15) to change
> Jog(Z,0); // StopMotion
>
> while(!CheckDone(Z)) ;
>
> Jog(Z,-3000); // start moving
> while (!ReadBit(15)) ; // wait for switch (input #15) to change
> Jog(Z,0); // StopMotion
>
> while(!CheckDone(Z)) ;
> Delay_sec(.25);
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
> Jog(Z,-3000);
> Move(Z,-500);
>
> while(!CheckDone(Z)) ;
> Delay_sec(.25);
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
> ch2->LimitSwitchOptions=0xf0f000f;
> }
> }
>
> Troy
>
> ---Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Ahh yes if an input is going to be used as a dual purpose Home and Limit then
> >we
> >
> > must disable Limits while Homing.
> >
> > Set the LimitSwithOptions to zero at the beginning of the Home process and
> > restore the proper value after homing and after moving back inside the limit
> > switch. 
> >
> > Eventually we might get this :}
> >
> > TK
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 27, 2011 5:13:56 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > I tried putting the same LimitSwitchOptions in both the Home C and Init
> > programs, but when i reference a axis and it triggers switch, it disables axis
>
> > and throws Mach into Reset.
> >
> > If i only have the LimitSwitchOptions set in the Home C program then it will
> > Reference correctly.
> >
> > Should it not work this away?
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Yes.  That is why the limits are enabled after you home.
> > >
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Huh... I dont know how I got the extra number in there, as i copied and
> >paste,
> >
> >
> > > but it was still working. :)
> > >
> > > I changed the values as you said, and all axis work the same as how i had it
>
> > > with other LimitSwitch Options. But iam keeping them as you said below.
> > >
> > > Would a LimitSwitchOption be set in the Init c program? I dont have any. I
> >only
> >
> > >
> > > have them set in the Home c program.
> > >
> > > Thanks,
> > > Troy
> > >
> >
>
Group: DynoMotion Message: 1203 From: tmday7 Date: 5/28/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I also added my latest C Programs to folder...
HomeEncoderMach3(Version3).c and Mach3_CL_PMDX-125(Version3).c
http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/




--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> Ok, i now have LimitSwitchOptions set in both C Programs and all works well, except for 1 thing, i cant jog out of limit switch once it has been triggered. I tried using Mach3s Manual Override Limits button on the Settings page, but Mach still stays in Reset until i move axis off limit switch.
> Can KFLOP watch the LED of the Manual Override Limits button and then allow axis to be jogged? Or sumthin like that.
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > That looks correct to me. The sequence you have hits the switch and decelerates
> > to a stop, reverses slowly until out of the switch, then decellerates to a stop,
> > then moves 500 more so it should end up well inside the range of travel.
> >
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 27, 2011 6:03:00 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > I think i have it for before and after home, but how do i do it after moving
> > back inside the limit switch?
> >
> > if (flags & 4)
> > {
> > ch2->LimitSwitchOptions=0x00000000; // disable limits
> > DisableAxis(Z);
> > Zero(Z);
> > EnableAxisDest(Z,0.0);
> >
> > Jog(Z,10000); // start moving
> > while (ReadBit(15)) ; // wait for switch (input #15) to change
> > Jog(Z,0); // StopMotion
> >
> > while(!CheckDone(Z)) ;
> >
> > Jog(Z,-3000); // start moving
> > while (!ReadBit(15)) ; // wait for switch (input #15) to change
> > Jog(Z,0); // StopMotion
> >
> > while(!CheckDone(Z)) ;
> > Delay_sec(.25);
> >
> > DisableAxis(Z);
> > Zero(Z);
> > EnableAxisDest(Z,0.0);
> > Jog(Z,-3000);
> > Move(Z,-500);
> >
> > while(!CheckDone(Z)) ;
> > Delay_sec(.25);
> >
> > DisableAxis(Z);
> > Zero(Z);
> > EnableAxisDest(Z,0.0);
> > ch2->LimitSwitchOptions=0xf0f000f;
> > }
> > }
> >
> > Troy
> >
> > ---Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Ahh yes if an input is going to be used as a dual purpose Home and Limit then
> > >we
> > >
> > > must disable Limits while Homing.
> > >
> > > Set the LimitSwithOptions to zero at the beginning of the Home process and
> > > restore the proper value after homing and after moving back inside the limit
> > > switch. 
> > >
> > > Eventually we might get this :}
> > >
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Fri, May 27, 2011 5:13:56 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > I tried putting the same LimitSwitchOptions in both the Home C and Init
> > > programs, but when i reference a axis and it triggers switch, it disables axis
> >
> > > and throws Mach into Reset.
> > >
> > > If i only have the LimitSwitchOptions set in the Home C program then it will
> > > Reference correctly.
> > >
> > > Should it not work this away?
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Yes.  That is why the limits are enabled after you home.
> > > >
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > >  
> > > > Huh... I dont know how I got the extra number in there, as i copied and
> > >paste,
> > >
> > >
> > > > but it was still working. :)
> > > >
> > > > I changed the values as you said, and all axis work the same as how i had it
> >
> > > > with other LimitSwitch Options. But iam keeping them as you said below.
> > > >
> > > > Would a LimitSwitchOption be set in the Init c program? I dont have any. I
> > >only
> > >
> > > >
> > > > have them set in the Home c program.
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > >
> >
>
Group: DynoMotion Message: 1204 From: Tom Kerekes Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Well I'm not sure how to detect that override state from the Plugin, but I suppose that is just some undocumented variable. 
 
I think you now know how to turn limits on and off in KFLOP.  You could add new Mach3 screen buttons to tell KFLOP to enable/disable limits with a NotifyPlugins() message. 
 
Another idea might be to do something like change your Init.c program to check if you are currently in the limit switch, and if so, do not enable limits.  That would allow you to Init, move out of the limits and then if you re-Init or Home the limits would be automatically enabled again.  But of course there is some danger in this method.
 
Regards
TK
 


 
On Sat, May 28, 2011 at 7:09 PM, tmday7 <tmday@...> wrote:
 

Ok, i now have LimitSwitchOptions set in both C Programs and all works well, except for 1 thing, i cant jog out of limit switch once it has been triggered. I tried using Mach3s Manual Override Limits button on the Settings page, but Mach still stays in Reset until i move axis off limit switch.
Can KFLOP watch the LED of the Manual Override Limits button and then allow axis to be jogged? Or sumthin like that.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> That looks correct to me. The sequence you have hits the switch and decelerates
> to a stop, reverses slowly until out of the switch, then decellerates to a stop,
> then moves 500 more so it should end up well inside the range of travel.
>
> TK
>
>
>
>
> ________________________________
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Fri, May 27, 2011 6:03:00 PM
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
>
>  
> I think i have it for before and after home, but how do i do it after moving
> back inside the limit switch?
>
> if (flags & 4)
> {
> ch2->LimitSwitchOptions=0x00000000; // disable limits
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
>
> Jog(Z,10000); // start moving
> while (ReadBit(15)) ; // wait for switch (input #15) to change
> Jog(Z,0); // StopMotion
>
> while(!CheckDone(Z)) ;
>
> Jog(Z,-3000); // start moving
> while (!ReadBit(15)) ; // wait for switch (input #15) to change
> Jog(Z,0); // StopMotion
>
> while(!CheckDone(Z)) ;
> Delay_sec(.25);
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
> Jog(Z,-3000);
> Move(Z,-500);
>
> while(!CheckDone(Z)) ;
> Delay_sec(.25);
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
> ch2->LimitSwitchOptions=0xf0f000f;
> }
> }
>
> Troy
>
> ---Tom Kerekes wrote:
> >
> > Hi Troy,
> >
> > Ahh yes if an input is going to be used as a dual purpose Home and Limit then
> >we
> >
> > must disable Limits while Homing.
> >
> > Set the LimitSwithOptions to zero at the beginning of the Home process and
> > restore the proper value after homing and after moving back inside the limit
> > switch. 
> >
> > Eventually we might get this :}
> >
> > TK
> >
> >
> >
> > ________________________________
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Fri, May 27, 2011 5:13:56 PM
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> >
> >  
> > I tried putting the same LimitSwitchOptions in both the Home C and Init
> > programs, but when i reference a axis and it triggers switch, it disables axis
>
> > and throws Mach into Reset.
> >
> > If i only have the LimitSwitchOptions set in the Home C program then it will
> > Reference correctly.
> >
> > Should it not work this away?
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Yes.  That is why the limits are enabled after you home.
> > >
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > >  
> > > Huh... I dont know how I got the extra number in there, as i copied and
> >paste,
> >
> >
> > > but it was still working. :)
> > >
> > > I changed the values as you said, and all axis work the same as how i had it
>
> > > with other LimitSwitch Options. But iam keeping them as you said below.
> > >
> > > Would a LimitSwitchOption be set in the Init c program? I dont have any. I
> >only
> >
> > >
> > > have them set in the Home c program.
> > >
> > > Thanks,
> > > Troy
> > >
> >
>


Group: DynoMotion Message: 1205 From: tmday7 Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
"I think you now know how to turn limits on and off in KFLOP. You could add new Mach3 screen buttons to tell KFLOP to enable/disable limits with a NotifyPlugins() message."

As i like the sound of 1st sentence, i dont think i truly understand just how. :) But would like to know the steps in making a button in Mach to enable/disable limits. And what to do in Kmotion to do this.

Add this to my Notify C program?
if (msg==10400)
{ // User wants to disable Limit Switch Options on X,Y,Z

ch0->LimitSwitchOptions=0x0;
ch1->LimitSwitchOptions=0x0;
ch2->LimitSwitchOptions=0x0;
}

and add this to a button in Mach?
NotifyPlugins(10400)
plus the VB to toggle the Manual Override Limits LED in Mach?
But how would NotifyPlugins(10400) enable/disable limit switch options?

Fill me in before get a BIG pile of ? marks. ;)
Thanks,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Well I'm not sure how to detect that override state from the Plugin, but I
> suppose that is just some undocumented variable.
>
> I think you now know how to turn limits on and off in KFLOP. You could add
> new Mach3 screen buttons to tell KFLOP to enable/disable limits with a
> NotifyPlugins() message.
>
> Another idea might be to do something like change your Init.c program to
> check if you are currently in the limit switch, and if so, do not enable
> limits. That would allow you to Init, move out of the limits and then if
> you re-Init or Home the limits would be automatically enabled again. But of
> course there is some danger in this method.
>
> Regards
> TK
>
>
>
>
> On Sat, May 28, 2011 at 7:09 PM, tmday7 <tmday@...> wrote:
>
> >
> >
> > Ok, i now have LimitSwitchOptions set in both C Programs and all works
> > well, except for 1 thing, i cant jog out of limit switch once it has been
> > triggered. I tried using Mach3s Manual Override Limits button on the
> > Settings page, but Mach still stays in Reset until i move axis off limit
> > switch.
> > Can KFLOP watch the LED of the Manual Override Limits button and then allow
> > axis to be jogged? Or sumthin like that.
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > That looks correct to me. The sequence you have hits the switch
> > and decelerates
> > > to a stop, reverses slowly until out of the switch, then decellerates to
> > a stop,
> > > then moves 500 more so it should end up well inside the range of travel.
> > >
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Fri, May 27, 2011 6:03:00 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > > Â
> > > I think i have it for before and after home, but how do i do it after
> > moving
> > > back inside the limit switch?
> > >
> > > if (flags & 4)
> > > {
> > > ch2->LimitSwitchOptions=0x00000000; // disable limits
> > > DisableAxis(Z);
> > > Zero(Z);
> > > EnableAxisDest(Z,0.0);
> > >
> > > Jog(Z,10000); // start moving
> > > while (ReadBit(15)) ; // wait for switch (input #15) to change
> > > Jog(Z,0); // StopMotion
> > >
> > > while(!CheckDone(Z)) ;
> > >
> > > Jog(Z,-3000); // start moving
> > > while (!ReadBit(15)) ; // wait for switch (input #15) to change
> > > Jog(Z,0); // StopMotion
> > >
> > > while(!CheckDone(Z)) ;
> > > Delay_sec(.25);
> > >
> > > DisableAxis(Z);
> > > Zero(Z);
> > > EnableAxisDest(Z,0.0);
> > > Jog(Z,-3000);
> > > Move(Z,-500);
> > >
> > > while(!CheckDone(Z)) ;
> > > Delay_sec(.25);
> > >
> > > DisableAxis(Z);
> > > Zero(Z);
> > > EnableAxisDest(Z,0.0);
> > > ch2->LimitSwitchOptions=0xf0f000f;
> > > }
> > > }
> > >
> > > Troy
> > >
> > > ---Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Ahh yes if an input is going to be used as a dual purpose Home and
> > Limit then
> > > >we
> > > >
> > > > must disable Limits while Homing.
> > > >
> > > > Set the LimitSwithOptions to zero at the beginning of the Home process
> > and
> > > > restore the proper value after homing and after moving back inside the
> > limit
> > > > switch.ÂÂ
> > > >
> > > > Eventually we might get this :}
> > > >
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Fri, May 27, 2011 5:13:56 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÂÂ
> > > > I tried putting the same LimitSwitchOptions in both the Home C and Init
> >
> > > > programs, but when i reference a axis and it triggers switch, it
> > disables axis
> > >
> > > > and throws Mach into Reset.
> > > >
> > > > If i only have the LimitSwitchOptions set in the Home C program then it
> > will
> > > > Reference correctly.
> > > >
> > > > Should it not work this away?
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Yes. That is why the limits are enabled after you home.
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > ÂÂ
> > > > > Huh... I dont know how I got the extra number in there, as i copied
> > and
> > > >paste,
> > > >
> > > >
> > > > > but it was still working. :)
> > > > >
> > > > > I changed the values as you said, and all axis work the same as how i
> > had it
> > >
> > > > > with other LimitSwitch Options. But iam keeping them as you said
> > below.
> > > > >
> > > > > Would a LimitSwitchOption be set in the Init c program? I dont have
> > any. I
> > > >only
> > > >
> > > > >
> > > > > have them set in the Home c program.
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > >
> > >
> >
> >
> >
>
Group: DynoMotion Message: 1206 From: Tom Kerekes Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Yes that is exactly what I was thinking to turn them off, but also to add another similar message to turn them on.
 
But there is one more complexity I just thought of.  Most likely the system is sitting in the limit and already in estop when the operator wants to disable limits and re-init the system.  If the Init program always turns on limits we will get another immediate fault and still be stuck.  So when we disable limits we should set a global flag that the Init program can check so it knows whether it should enable limits or not.  Let's use KFLOP UserData variable 98 as a flag (1==Init should disable limits, 0=Init should not disable limits).  Try this:
 
 
in the notify program put:
 
if (msg==10400)
{
   // User wants to disable Limit Switch Options on X,Y,Z
   ch0->LimitSwitchOptions=0x0;
   ch1->LimitSwitchOptions=0x0;
   ch2->LimitSwitchOptions=0x0;
   persist.UserData[98]=1;
}

if (msg==10401)
{
   // User wants to enable Limit Switch Options on X,Y,Z
   ch0->LimitSwitchOptions=0x????;
   ch1->LimitSwitchOptions=0x????;
   ch2->LimitSwitchOptions=0x????;
   persist.UserData[98]=0;
}
 
In the Init.c program (just before the forever for loop) put:
 
 
 
if (persist.UserData[98])
{
   // User wants to disable Limit Switch Options on X,Y,Z
   ch0->LimitSwitchOptions=0x0;
   ch1->LimitSwitchOptions=0x0;
   ch2->LimitSwitchOptions=0x0;
}
else
{
   // User wants to enable Limit Switch Options on X,Y,Z
   ch0->LimitSwitchOptions=0x????;
   ch1->LimitSwitchOptions=0x????;
   ch2->LimitSwitchOptions=0x????;
}
TK
On Sun, May 29, 2011 at 11:22 AM, tmday7 <tmday@...> wrote:
 

"I think you now know how to turn limits on and off in KFLOP. You could add new Mach3 screen buttons to tell KFLOP to enable/disable limits with a NotifyPlugins() message."

As i like the sound of 1st sentence, i dont think i truly understand just how. :) But would like to know the steps in making a button in Mach to enable/disable limits. And what to do in Kmotion to do this.

Add this to my Notify C program?
if (msg==10400)
{ // User wants to disable Limit Switch Options on X,Y,Z

ch0->LimitSwitchOptions=0x0;
ch1->LimitSwitchOptions=0x0;
ch2->LimitSwitchOptions=0x0;
}

and add this to a button in Mach?
NotifyPlugins(10400)
plus the VB to toggle the Manual Override Limits LED in Mach?
But how would NotifyPlugins(10400) enable/disable limit switch options?

Fill me in before get a BIG pile of ? marks. ;)
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Well I'm not sure how to detect that override state from the Plugin, but I
> suppose that is just some undocumented variable.
>
> I think you now know how to turn limits on and off in KFLOP. You could add
> new Mach3 screen buttons to tell KFLOP to enable/disable limits with a
> NotifyPlugins() message.
>
> Another idea might be to do something like change your Init.c program to
> check if you are currently in the limit switch, and if so, do not enable
> limits. That would allow you to Init, move out of the limits and then if
> you re-Init or Home the limits would be automatically enabled again. But of
> course there is some danger in this method.
>
> Regards
> TK
>
>
>
>
> On Sat, May 28, 2011 at 7:09 PM, tmday7 <tmday@...> wrote:
>
> >
> >
> > Ok, i now have LimitSwitchOptions set in both C Programs and all works
> > well, except for 1 thing, i cant jog out of limit switch once it has been
> > triggered. I tried using Mach3s Manual Override Limits button on the
> > Settings page, but Mach still stays in Reset until i move axis off limit
> > switch.
> > Can KFLOP watch the LED of the Manual Override Limits button and then allow
> > axis to be jogged? Or sumthin like that.
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > That looks correct to me. The sequence you have hits the switch
> > and decelerates
> > > to a stop, reverses slowly until out of the switch, then decellerates to
> > a stop,
> > > then moves 500 more so it should end up well inside the range of travel.
> > >
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Fri, May 27, 2011 6:03:00 PM
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > >
> > > Â
> > > I think i have it for before and after home, but how do i do it after
> > moving
> > > back inside the limit switch?
> > >
> > > if (flags & 4)
> > > {
> > > ch2->LimitSwitchOptions=0x00000000; // disable limits
> > > DisableAxis(Z);
> > > Zero(Z);
> > > EnableAxisDest(Z,0.0);
> > >
> > > Jog(Z,10000); // start moving
> > > while (ReadBit(15)) ; // wait for switch (input #15) to change
> > > Jog(Z,0); // StopMotion
> > >
> > > while(!CheckDone(Z)) ;
> > >
> > > Jog(Z,-3000); // start moving
> > > while (!ReadBit(15)) ; // wait for switch (input #15) to change
> > > Jog(Z,0); // StopMotion
> > >
> > > while(!CheckDone(Z)) ;
> > > Delay_sec(.25);
> > >
> > > DisableAxis(Z);
> > > Zero(Z);
> > > EnableAxisDest(Z,0.0);
> > > Jog(Z,-3000);
> > > Move(Z,-500);
> > >
> > > while(!CheckDone(Z)) ;
> > > Delay_sec(.25);
> > >
> > > DisableAxis(Z);
> > > Zero(Z);
> > > EnableAxisDest(Z,0.0);
> > > ch2->LimitSwitchOptions=0xf0f000f;
> > > }
> > > }
> > >
> > > Troy
> > >
> > > ---Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > Ahh yes if an input is going to be used as a dual purpose Home and
> > Limit then
> > > >we
> > > >
> > > > must disable Limits while Homing.
> > > >
> > > > Set the LimitSwithOptions to zero at the beginning of the Home process
> > and
> > > > restore the proper value after homing and after moving back inside the
> > limit
> > > > switch.ÂÂ
> > > >
> > > > Eventually we might get this :}
> > > >
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Fri, May 27, 2011 5:13:56 PM
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > >
> > > > ÂÂ
> > > > I tried putting the same LimitSwitchOptions in both the Home C and Init
> >
> > > > programs, but when i reference a axis and it triggers switch, it
> > disables axis
> > >
> > > > and throws Mach into Reset.
> > > >
> > > > If i only have the LimitSwitchOptions set in the Home C program then it
> > will
> > > > Reference correctly.
> > > >
> > > > Should it not work this away?
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Yes. That is why the limits are enabled after you home.
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > ÂÂ
> > > > > Huh... I dont know how I got the extra number in there, as i copied
> > and
> > > >paste,
> > > >
> > > >
> > > > > but it was still working. :)
> > > > >
> > > > > I changed the values as you said, and all axis work the same as how i
> > had it
> > >
> > > > > with other LimitSwitch Options. But iam keeping them as you said
> > below.
> > > > >
> > > > > Would a LimitSwitchOption be set in the Init c program? I dont have
> > any. I
> > > >only
> > > >
> > > > >
> > > > > have them set in the Home c program.
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > >
> > >
> >
> >
> >
>


Group: DynoMotion Message: 1207 From: tmday7 Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Wow, that makes feel a little better, as i was wondering about the Init program and hitting Reset.:)

Ummm....."(just before the forever for loop)..." Where is that? :)

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Yes that is exactly what I was thinking to turn them off, but also to add
> another similar message to turn them on.
>
> But there is one more complexity I just thought of. Most likely the system
> is sitting in the limit and already in estop when the operator wants to
> disable limits and re-init the system. If the Init program always turns on
> limits we will get another immediate fault and still be stuck. So when we
> disable limits we should set a global flag that the Init program can check
> so it knows whether it should enable limits or not. Let's use KFLOP
> UserData variable 98 as a flag (1==Init should disable limits, 0=Init should
> not disable limits). Try this:
>
>
> in the notify program put:
>
> if (msg==10400)
> {
> // User wants to disable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x0;
> ch1->LimitSwitchOptions=0x0;
> ch2->LimitSwitchOptions=0x0;
> persist.UserData[98]=1;
> }
>
> if (msg==10401)
> {
> // User wants to enable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x????;
> ch1->LimitSwitchOptions=0x????;
> ch2->LimitSwitchOptions=0x????;
> persist.UserData[98]=0;
> }
>
> In the Init.c program (just before the forever for loop) put:
>
>
>
> if (persist.UserData[98])
> {
> // User wants to disable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x0;
> ch1->LimitSwitchOptions=0x0;
> ch2->LimitSwitchOptions=0x0;
> }
> else
> {
> // User wants to enable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x????;
> ch1->LimitSwitchOptions=0x????;
> ch2->LimitSwitchOptions=0x????;
> }
> TK
> On Sun, May 29, 2011 at 11:22 AM, tmday7 <tmday@...>wrote:
>
> >
> >
> > "I think you now know how to turn limits on and off in KFLOP. You could add
> > new Mach3 screen buttons to tell KFLOP to enable/disable limits with a
> > NotifyPlugins() message."
> >
> > As i like the sound of 1st sentence, i dont think i truly understand just
> > how. :) But would like to know the steps in making a button in Mach to
> > enable/disable limits. And what to do in Kmotion to do this.
> >
> > Add this to my Notify C program?
> > if (msg==10400)
> > { // User wants to disable Limit Switch Options on X,Y,Z
> >
> > ch0->LimitSwitchOptions=0x0;
> > ch1->LimitSwitchOptions=0x0;
> > ch2->LimitSwitchOptions=0x0;
> > }
> >
> > and add this to a button in Mach?
> > NotifyPlugins(10400)
> > plus the VB to toggle the Manual Override Limits LED in Mach?
> > But how would NotifyPlugins(10400) enable/disable limit switch options?
> >
> > Fill me in before get a BIG pile of ? marks. ;)
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Well I'm not sure how to detect that override state from the Plugin, but
> > I
> > > suppose that is just some undocumented variable.
> > >
> > > I think you now know how to turn limits on and off in KFLOP. You could
> > add
> > > new Mach3 screen buttons to tell KFLOP to enable/disable limits with a
> > > NotifyPlugins() message.
> > >
> > > Another idea might be to do something like change your Init.c program to
> > > check if you are currently in the limit switch, and if so, do not enable
> > > limits. That would allow you to Init, move out of the limits and then if
> > > you re-Init or Home the limits would be automatically enabled again. But
> > of
> > > course there is some danger in this method.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > On Sat, May 28, 2011 at 7:09 PM, tmday7 <tmday@> wrote:
> > >
> > > >
> > > >
> > > > Ok, i now have LimitSwitchOptions set in both C Programs and all works
> > > > well, except for 1 thing, i cant jog out of limit switch once it has
> > been
> > > > triggered. I tried using Mach3s Manual Override Limits button on the
> > > > Settings page, but Mach still stays in Reset until i move axis off
> > limit
> > > > switch.
> > > > Can KFLOP watch the LED of the Manual Override Limits button and then
> > allow
> > > > axis to be jogged? Or sumthin like that.
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > That looks correct to me. The sequence you have hits the switch
> > > > and decelerates
> > > > > to a stop, reverses slowly until out of the switch, then
> > decellerates to
> > > > a stop,
> > > > > then moves 500 more so it should end up well inside the range of
> > travel.
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Fri, May 27, 2011 6:03:00 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > Â
> > > > > I think i have it for before and after home, but how do i do it after
> > > > moving
> > > > > back inside the limit switch?
> > > > >
> > > > > if (flags & 4)
> > > > > {
> > > > > ch2->LimitSwitchOptions=0x00000000; // disable limits
> > > > > DisableAxis(Z);
> > > > > Zero(Z);
> > > > > EnableAxisDest(Z,0.0);
> > > > >
> > > > > Jog(Z,10000); // start moving
> > > > > while (ReadBit(15)) ; // wait for switch (input #15) to change
> > > > > Jog(Z,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(Z)) ;
> > > > >
> > > > > Jog(Z,-3000); // start moving
> > > > > while (!ReadBit(15)) ; // wait for switch (input #15) to change
> > > > > Jog(Z,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(Z)) ;
> > > > > Delay_sec(.25);
> > > > >
> > > > > DisableAxis(Z);
> > > > > Zero(Z);
> > > > > EnableAxisDest(Z,0.0);
> > > > > Jog(Z,-3000);
> > > > > Move(Z,-500);
> > > > >
> > > > > while(!CheckDone(Z)) ;
> > > > > Delay_sec(.25);
> > > > >
> > > > > DisableAxis(Z);
> > > > > Zero(Z);
> > > > > EnableAxisDest(Z,0.0);
> > > > > ch2->LimitSwitchOptions=0xf0f000f;
> > > > > }
> > > > > }
> > > > >
> > > > > Troy
> > > > >
> > > > > ---Tom Kerekes wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >
> > > > > > Ahh yes if an input is going to be used as a dual purpose Home and
> > > > Limit then
> > > > > >we
> > > > > >
> > > > > > must disable Limits while Homing.
> > > > > >
> > > > > > Set the LimitSwithOptions to zero at the beginning of the Home
> > process
> > > > and
> > > > > > restore the proper value after homing and after moving back inside
> > the
> > > > limit
> > > > > > switch.ÂÂ
> > > > > >
> > > > > > Eventually we might get this :}
> > > > > >
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Fri, May 27, 2011 5:13:56 PM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > > ÂÂ
> > > > > > I tried putting the same LimitSwitchOptions in both the Home C and
> > Init
> > > >
> > > > > > programs, but when i reference a axis and it triggers switch, it
> > > > disables axis
> > > > >
> > > > > > and throws Mach into Reset.
> > > > > >
> > > > > > If i only have the LimitSwitchOptions set in the Home C program
> > then it
> > > > will
> > > > > > Reference correctly.
> > > > > >
> > > > > > Should it not work this away?
> > > > > > Troy
> > > > > >
> > > > > > --- Tom Kerekes wrote:
> > > > > > >
> > > > > > > Yes. That is why the limits are enabled after you home.
> > > > > > >
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > > ÂÂ
> > > > > > > Huh... I dont know how I got the extra number in there, as i
> > copied
> > > > and
> > > > > >paste,
> > > > > >
> > > > > >
> > > > > > > but it was still working. :)
> > > > > > >
> > > > > > > I changed the values as you said, and all axis work the same as
> > how i
> > > > had it
> > > > >
> > > > > > > with other LimitSwitch Options. But iam keeping them as you said
> > > > below.
> > > > > > >
> > > > > > > Would a LimitSwitchOption be set in the Init c program? I dont
> > have
> > > > any. I
> > > > > >only
> > > > > >
> > > > > > >
> > > > > > > have them set in the Home c program.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>
Group: DynoMotion Message: 1208 From: Tom Kerekes Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
In C language a common way to form a loop is with a "for" statement.  The for statement is very powerful and can consist of something to do first before the loop (ie set a counter to zero), a condition to decide when to exit the loop (for example when a counter is 10), something to do after each loop (ie increment a counter), and then the loop.  Notice the initial, exit condition, and increment are separated by semicolons.  So for example to print the numbers 0 through 99 we could code:
 
for (i=0; i<100; i++)
{
   printf("%d\n",i);
}
 
 
In the extreme case when we don't need to do any of those things and never want to exit it can be coded as:
 
for (;;)
{
     // this loop stuff will be executed forever
     // this loop stuff will be executed forever
     // this loop stuff will be executed forever
     // this loop stuff will be executed forever
     // this loop stuff will be executed forever
}
 
 
In your init program towards the end is the for (;;) loop that loops forever testing all your manual switches and such.  Let's conditionally set the Limits just before the "for" statement.
 
TK
 


 
On Sun, May 29, 2011 at 2:25 PM, tmday7 <tmday@...> wrote:
 

Wow, that makes feel a little better, as i was wondering about the Init program and hitting Reset.:)

Ummm....."(just before the forever for loop)..." Where is that? :)

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>
> Yes that is exactly what I was thinking to turn them off, but also to add
> another similar message to turn them on.
>
> But there is one more complexity I just thought of. Most likely the system
> is sitting in the limit and already in estop when the operator wants to
> disable limits and re-init the system. If the Init program always turns on
> limits we will get another immediate fault and still be stuck. So when we
> disable limits we should set a global flag that the Init program can check
> so it knows whether it should enable limits or not. Let's use KFLOP
> UserData variable 98 as a flag (1==Init should disable limits, 0=Init should
> not disable limits). Try this:
>
>
> in the notify program put:
>
> if (msg==10400)
> {
> // User wants to disable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x0;
> ch1->LimitSwitchOptions=0x0;
> ch2->LimitSwitchOptions=0x0;
> persist.UserData[98]=1;
> }
>
> if (msg==10401)
> {
> // User wants to enable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x????;
> ch1->LimitSwitchOptions=0x????;
> ch2->LimitSwitchOptions=0x????;
> persist.UserData[98]=0;
> }
>
> In the Init.c program (just before the forever for loop) put:
>
>
>
> if (persist.UserData[98])
> {
> // User wants to disable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x0;
> ch1->LimitSwitchOptions=0x0;
> ch2->LimitSwitchOptions=0x0;
> }
> else
> {
> // User wants to enable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x????;
> ch1->LimitSwitchOptions=0x????;
> ch2->LimitSwitchOptions=0x????;
> }
> TK
> On Sun, May 29, 2011 at 11:22 AM, tmday7 <tmday@...>wrote:
>
> >
> >
> > "I think you now know how to turn limits on and off in KFLOP. You could add
> > new Mach3 screen buttons to tell KFLOP to enable/disable limits with a
> > NotifyPlugins() message."
> >
> > As i like the sound of 1st sentence, i dont think i truly understand just
> > how. :) But would like to know the steps in making a button in Mach to
> > enable/disable limits. And what to do in Kmotion to do this.
> >
> > Add this to my Notify C program?
> > if (msg==10400)
> > { // User wants to disable Limit Switch Options on X,Y,Z
> >
> > ch0->LimitSwitchOptions=0x0;
> > ch1->LimitSwitchOptions=0x0;
> > ch2->LimitSwitchOptions=0x0;
> > }
> >
> > and add this to a button in Mach?
> > NotifyPlugins(10400)
> > plus the VB to toggle the Manual Override Limits LED in Mach?
> > But how would NotifyPlugins(10400) enable/disable limit switch options?
> >
> > Fill me in before get a BIG pile of ? marks. ;)
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >
> > > Well I'm not sure how to detect that override state from the Plugin, but
> > I
> > > suppose that is just some undocumented variable.
> > >
> > > I think you now know how to turn limits on and off in KFLOP. You could
> > add
> > > new Mach3 screen buttons to tell KFLOP to enable/disable limits with a
> > > NotifyPlugins() message.
> > >
> > > Another idea might be to do something like change your Init.c program to
> > > check if you are currently in the limit switch, and if so, do not enable
> > > limits. That would allow you to Init, move out of the limits and then if
> > > you re-Init or Home the limits would be automatically enabled again. But
> > of
> > > course there is some danger in this method.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > On Sat, May 28, 2011 at 7:09 PM, tmday7 <tmday@> wrote:
> > >
> > > >
> > > >
> > > > Ok, i now have LimitSwitchOptions set in both C Programs and all works
> > > > well, except for 1 thing, i cant jog out of limit switch once it has
> > been
> > > > triggered. I tried using Mach3s Manual Override Limits button on the
> > > > Settings page, but Mach still stays in Reset until i move axis off
> > limit
> > > > switch.
> > > > Can KFLOP watch the LED of the Manual Override Limits button and then
> > allow
> > > > axis to be jogged? Or sumthin like that.
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > That looks correct to me. The sequence you have hits the switch
> > > > and decelerates
> > > > > to a stop, reverses slowly until out of the switch, then
> > decellerates to
> > > > a stop,
> > > > > then moves 500 more so it should end up well inside the range of
> > travel.
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Fri, May 27, 2011 6:03:00 PM
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > >
> > > > > Â
> > > > > I think i have it for before and after home, but how do i do it after
> > > > moving
> > > > > back inside the limit switch?
> > > > >
> > > > > if (flags & 4)
> > > > > {
> > > > > ch2->LimitSwitchOptions=0x00000000; // disable limits
> > > > > DisableAxis(Z);
> > > > > Zero(Z);
> > > > > EnableAxisDest(Z,0.0);
> > > > >
> > > > > Jog(Z,10000); // start moving
> > > > > while (ReadBit(15)) ; // wait for switch (input #15) to change
> > > > > Jog(Z,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(Z)) ;
> > > > >
> > > > > Jog(Z,-3000); // start moving
> > > > > while (!ReadBit(15)) ; // wait for switch (input #15) to change
> > > > > Jog(Z,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(Z)) ;
> > > > > Delay_sec(.25);
> > > > >
> > > > > DisableAxis(Z);
> > > > > Zero(Z);
> > > > > EnableAxisDest(Z,0.0);
> > > > > Jog(Z,-3000);
> > > > > Move(Z,-500);
> > > > >
> > > > > while(!CheckDone(Z)) ;
> > > > > Delay_sec(.25);
> > > > >
> > > > > DisableAxis(Z);
> > > > > Zero(Z);
> > > > > EnableAxisDest(Z,0.0);
> > > > > ch2->LimitSwitchOptions=0xf0f000f;
> > > > > }
> > > > > }
> > > > >
> > > > > Troy
> > > > >
> > > > > ---Tom Kerekes wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >
> > > > > > Ahh yes if an input is going to be used as a dual purpose Home and
> > > > Limit then
> > > > > >we
> > > > > >
> > > > > > must disable Limits while Homing.
> > > > > >
> > > > > > Set the LimitSwithOptions to zero at the beginning of the Home
> > process
> > > > and
> > > > > > restore the proper value after homing and after moving back inside
> > the
> > > > limit
> > > > > > switch.ÂÂ
> > > > > >
> > > > > > Eventually we might get this :}
> > > > > >
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Fri, May 27, 2011 5:13:56 PM
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > >
> > > > > > ÂÂ
> > > > > > I tried putting the same LimitSwitchOptions in both the Home C and
> > Init
> > > >
> > > > > > programs, but when i reference a axis and it triggers switch, it
> > > > disables axis
> > > > >
> > > > > > and throws Mach into Reset.
> > > > > >
> > > > > > If i only have the LimitSwitchOptions set in the Home C program
> > then it
> > > > will
> > > > > > Reference correctly.
> > > > > >
> > > > > > Should it not work this away?
> > > > > > Troy
> > > > > >
> > > > > > --- Tom Kerekes wrote:
> > > > > > >
> > > > > > > Yes. That is why the limits are enabled after you home.
> > > > > > >
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Fri, May 27, 2011 2:47:14 PM
> > > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > >
> > > > > > > ÂÂ
> > > > > > > Huh... I dont know how I got the extra number in there, as i
> > copied
> > > > and
> > > > > >paste,
> > > > > >
> > > > > >
> > > > > > > but it was still working. :)
> > > > > > >
> > > > > > > I changed the values as you said, and all axis work the same as
> > how i
> > > > had it
> > > > >
> > > > > > > with other LimitSwitch Options. But iam keeping them as you said
> > > > below.
> > > > > > >
> > > > > > > Would a LimitSwitchOption be set in the Init c program? I dont
> > have
> > > > any. I
> > > > > >only
> > > > > >
> > > > > > >
> > > > > > > have them set in the Home c program.
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Troy
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>


Group: DynoMotion Message: 1209 From: tmday7 Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok, added just before the 'for', but when i click my LimitSwitch disable button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of Kmotion.Because Mach wont come out of Reset, so all buttons i click are being ignored.
Whats next?
Troy

--- Tom Kerekes wrote:
>
> In C language a common way to form a loop is with a "for" statement. The
> for statement is very powerful and can consist of something to do first
> before the loop (ie set a counter to zero), a condition to decide when to
> exit the loop (for example when a counter is 10), something to do after each
> loop (ie increment a counter), and then the loop. Notice the initial, exit
> condition, and increment are separated by semicolons. So for example to
> print the numbers 0 through 99 we could code:
>
> for (i=0; i<100; i++)
> {
> printf("%d\n",i);
> }
>
>
> In the extreme case when we don't need to do any of those things and never
> want to exit it can be coded as:
>
> for (;;)
> {
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> }
>
>
> In your init program towards the end is the for (;;) loop that loops forever
> testing all your manual switches and such. Let's conditionally set the
> Limits just before the "for" statement.
>
> TK
Group: DynoMotion Message: 1210 From: Tom Kerekes Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Ok you got me.  This thing will fight us tooth and nail till the end :}
 
How about trying this:  I think it is possible to download Mach3 DROs to KFlop while the axes are disabled and in EStop.
 
Downloading a 64-bit floating point number from a DRO to be used as a flag is a bit of overkill but it should work.
 
Let's use Mach3 DRO 40 as the disable flag.  Here is some VB to download a value of 1.0
 
SetOEMDRO(1040,1.0)  'Put a value in a Mach DRO
NotifyPlugins(19040)     'Send it to KFLOP  
 
 
Here is how to download a 0.0
 
SetOEMDRO(1040,0.0)  'Put a value in a Mach DRO
NotifyPlugins(19040)     'Send it to KFLOP  
 
Here is some C code to test and print the value.  When merging this code into the Init program put the two definition lines right after main() into the Init program right after main() in a similar manner.  Then put the 'If" statement down in front of the forever loop as we discussed.  We might as well include the print statement to help debug.
 
 
#include "KMotionDef.h"
main()
{
    #define DROIN 40
    double *pin  = (double *)&persist.UserData[(DROIN -1)*2];
   
    printf("DRO = %f\n",*pin);
   
    if (*pin == 0)
    {
        ch0->LimitSwitchOptions = 0x0606000f;
        ch1->LimitSwitchOptions = 0x0707000f;
        ch2->LimitSwitchOptions = 0x0f0f000f;
    }
    else
    {
        ch0->LimitSwitchOptions = 0x0;
        ch1->LimitSwitchOptions = 0x0;
        ch2->LimitSwitchOptions = 0x0;
    }
}
 
 
 


 
On Sun, May 29, 2011 at 4:56 PM, tmday7 <tmday@...> wrote:
 

Ok, added just before the 'for', but when i click my LimitSwitch disable button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of Kmotion.Because Mach wont come out of Reset, so all buttons i click are being ignored.
Whats next?
Troy

--- Tom Kerekes wrote:
>
> In C language a common way to form a loop is with a "for" statement. The
> for statement is very powerful and can consist of something to do first
> before the loop (ie set a counter to zero), a condition to decide when to
> exit the loop (for example when a counter is 10), something to do after each
> loop (ie increment a counter), and then the loop. Notice the initial, exit
> condition, and increment are separated by semicolons. So for example to
> print the numbers 0 through 99 we could code:
>
> for (i=0; i<100; i++)
> {
> printf("%d\n",i);
> }
>
>
> In the extreme case when we don't need to do any of those things and never
> want to exit it can be coded as:
>
> for (;;)
> {
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> // this loop stuff will be executed forever
> }
>
>
> In your init program towards the end is the for (;;) loop that loops forever
> testing all your manual switches and such. Let's conditionally set the
> Limits just before the "for" statement.
>
> TK


Group: DynoMotion Message: 1211 From: tmday7 Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....

// Debounce a bit
//
// return 1 one time when first debounced high
// return 0 one time when first debounced low
// return -1 otherwise
#define DBTIME 300

int Debounce(int n, int *cnt, int *last, int *lastsolid)
{ <<<<<<right here is where i get the Compile Error
    int v = -1;
   
    if (n == *last)  // same as last time?
    {
        if (*cnt == DBTIME-1)
        {
            if (n != *lastsolid)
            {
                v = *lastsolid = n;  // return debounced value
            }
        }
        if (*cnt < DBTIME)    (*cnt)++;
    }
    else
    {
        *cnt = 0;  // reset count
    }
    *last = n;
    return v;
}

Troy



--- Tom Kerekes  wrote:
>
> Ok you got me. This thing will fight us tooth and nail till the end :}
>
> How about trying this: I think it is possible to download Mach3 DROs to
> KFlop while the axes are disabled and in EStop.
>
> Downloading a 64-bit floating point number from a DRO to be used as a flag
> is a bit of overkill but it should work.
>
> Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> value of 1.0
>
> SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
>
>
> Here is how to download a 0.0
>
> SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
>
> Here is some C code to test and print the value. When merging this code
> into the Init program put the two definition lines right after main() into
> the Init program right after main() in a similar manner. Then put the 'If"
> statement down in front of the forever loop as we discussed. We might as
> well include the print statement to help debug.
>
>
> #include "KMotionDef.h"
> main()
> {
> #define DROIN 40
> double *pin = (double *)&persist.UserData[(DROIN -1)*2];
>
> printf("DRO = %f\n",*pin);
>
> if (*pin == 0)
> {
> ch0->LimitSwitchOptions = 0x0606000f;
> ch1->LimitSwitchOptions = 0x0707000f;
> ch2->LimitSwitchOptions = 0x0f0f000f;
> }
> else
> {
> ch0->LimitSwitchOptions = 0x0;
> ch1->LimitSwitchOptions = 0x0;
> ch2->LimitSwitchOptions = 0x0;
> }
> }
>
>
>
>
>
>
> On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@... wrote:
>
> >
> >
> > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > being ignored.
> > Whats next?
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > In C language a common way to form a loop is with a "for" statement. The
> > > for statement is very powerful and can consist of something to do first
> > > before the loop (ie set a counter to zero), a condition to decide when to
> > > exit the loop (for example when a counter is 10), something to do after
> > each
> > > loop (ie increment a counter), and then the loop. Notice the initial,
> > exit
> > > condition, and increment are separated by semicolons. So for example to
> > > print the numbers 0 through 99 we could code:
> > >
> > > for (i=0; i<100; i++)
> > > {
> > > printf("%d\n",i);
> > > }
> > >
> > >
> > > In the extreme case when we don't need to do any of those things and
> > never
> > > want to exit it can be coded as:
> > >
> > > for (;;)
> > > {
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > }
> > >
> > >
> > > In your init program towards the end is the for (;;) loop that loops
> > forever
> > > testing all your manual switches and such. Let's conditionally set the
> > > Limits just before the "for" statement.
> > >
> > > TK
> >
> >
> >
>
Group: DynoMotion Message: 1212 From: TK Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets

if ()
{
}
else
{
}

TK

On May 29, 2011, at 8:49 PM, "tmday7" <tmday@...> wrote:

 

I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....

// Debounce a bit
//
// return 1 one time when first debounced high
// return 0 one time when first debounced low
// return -1 otherwise
#define DBTIME 300

int Debounce(int n, int *cnt, int *last, int *lastsolid)
{ <<<<<<right here is where i get the Compile Error
    int v = -1;
   
    if (n == *last)  // same as last time?
    {
        if (*cnt == DBTIME-1)
        {
            if (n != *lastsolid)
            {
                v = *lastsolid = n;  // return debounced value
            }
        }
        if (*cnt < DBTIME)    (*cnt)++;
    }
    else
    {
        *cnt = 0;  // reset count
    }
    *last = n;
    return v;
}

Troy



--- Tom Kerekes  wrote:
>
> Ok you got me. This thing will fight us tooth and nail till the end :}
>
> How about trying this: I think it is possible to download Mach3 DROs to
> KFlop while the axes are disabled and in EStop.
>
> Downloading a 64-bit floating point number from a DRO to be used as a flag
> is a bit of overkill but it should work.
>
> Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> value of 1.0
>
> SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
>
>
> Here is how to download a 0.0
>
> SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
>
> Here is some C code to test and print the value. When merging this code
> into the Init program put the two definition lines right after main() into
> the Init program right after main() in a similar manner. Then put the 'If"
> statement down in front of the forever loop as we discussed. We might as
> well include the print statement to help debug.
>
>
> #include "KMotionDef.h"
> main()
> {
> #define DROIN 40
> double *pin = (double *)&persist.UserData[(DROIN -1)*2];
>
> printf("DRO = %f\n",*pin);
>
> if (*pin == 0)
> {
> ch0->LimitSwitchOptions = 0x0606000f;
> ch1->LimitSwitchOptions = 0x0707000f;
> ch2->LimitSwitchOptions = 0x0f0f000f;
> }
> else
> {
> ch0->LimitSwitchOptions = 0x0;
> ch1->LimitSwitchOptions = 0x0;
> ch2->LimitSwitchOptions = 0x0;
> }
> }
>
>
>
>
>
>
> On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@... wrote:
>
> >
> >
> > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > being ignored.
> > Whats next?
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > In C language a common way to form a loop is with a "for" statement. The
> > > for statement is very powerful and can consist of something to do first
> > > before the loop (ie set a counter to zero), a condition to decide when to
> > > exit the loop (for example when a counter is 10), something to do after
> > each
> > > loop (ie increment a counter), and then the loop. Notice the initial,
> > exit
> > > condition, and increment are separated by semicolons. So for example to
> > > print the numbers 0 through 99 we could code:
> > >
> > > for (i=0; i<100; i++)
> > > {
> > > printf("%d\n",i);
> > > }
> > >
> > >
> > > In the extreme case when we don't need to do any of those things and
> > never
> > > want to exit it can be coded as:
> > >
> > > for (;;)
> > > {
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > }
> > >
> > >
> > > In your init program towards the end is the for (;;) loop that loops
> > forever
> > > testing all your manual switches and such. Let's conditionally set the
> > > Limits just before the "for" statement.
> > >
> > > TK
> >
> >
> >
>

Group: DynoMotion Message: 1213 From: Lee Studley Date: 5/29/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Or an item missing( ie curley bracket) above this code. Also check any modifications made to included  xxxx.h header files   -Lee

On 5/29/2011 9:21 PM, TK wrote:
 
You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets

if ()
{
}
else
{
}

TK

On May 29, 2011, at 8:49 PM, "tmday7" <tmday@...> wrote:

 

I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....

// Debounce a bit
//
// return 1 one time when first debounced high
// return 0 one time when first debounced low
// return -1 otherwise
#define DBTIME 300

int Debounce(int n, int *cnt, int *last, int *lastsolid)
{ <<<<<<right here is where i get the Compile Error
    int v = -1;
   
    if (n == *last)  // same as last time?
    {
        if (*cnt == DBTIME-1)
        {
            if (n != *lastsolid)
            {
                v = *lastsolid = n;&nb sp; // return debounced value
            }
        }
        if (*cnt < DBTIME)    (*cnt)++;
    }
    else
    {
        *cnt = 0;  // reset count
    }
    *last = n;
    return v;
}

Troy



--- Tom Kerekes  wrote:
>
> Ok you got me. This thing will fight us tooth and nail till the end :}
>
> How about trying this: I think it is possible to download Mach3 DROs to
> KFlop while the axes are disabled and in EStop.
>
> Downloading a 64-bit floating point number from a DRO to be used as a flag
> is a bit of overkill but it should work.
>
> Let's use Mach3 DRO 40 as the disable flag. Here is some VB to downlo ad a
> value of 1.0
>
> SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
>
>
> Here is how to download a 0.0
>
> SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
>
> Here is some C code to test and print the value. When merging this code
> into the Init program put the two definition lines right after main() into
> the Init program right after main() in a similar manner. Then put the 'If"
> statement down in front of the forever loop as we discussed. We might as
> well include the print statement to help debug.
>
>
> #include "KMotionDef.h"
> main()
> {
> #define DROIN 40
> double *pin = (double *)&persist.UserData[(DROIN -1)*2];
>
> printf("DRO = %f\n",*pin);
>
> if (*pin == 0)
> {
> ch0->LimitSwitchOptions = 0x0606000f;
> ch1->LimitSwitchOptions = 0x0707000f;
> ch2->LimitSwitchOptions = 0x0f0f000f;
> }
> else
> {
> ch0->LimitSwitchOptions = 0x0;
> ch1->LimitSwitchOptions = 0x0;
> ch2->LimitSwitchOptions = 0x0;
> }
> }
>
>
>
>
>
>
> On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@... wrote:
>
> >
> >
> > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > being ignored.
> > Whats next?
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > In C language a common way to form a loop is with a "for" statement. The
> > > for statement is very powerful and can consist of something to do first
> > > before the loop (ie set a counter to zero), a condition to decide when to
> > > exit the loop (for example when a counter is 10), something to do after
> > each
> > > loop (ie increment a counter), and then the loop. Notice the initial,
> > exit
> > > condition, and increment are separated by semicolons. So for example to
> > > print the numbers 0 through 99 we could code:
> > >
> > > for (i=0; i<100; i++)
> > > {
> > > printf("%d\n",i);
> > > }
> > >
> > >
> > > In the extreme case when we don't need to do any of those things and
> > never
> > > want to exit it can be coded as:
> > >
> > > for (;;)
> > > {
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > // this loop stuff will be executed forever
> > > }
> > >
> > >
> > > In your init program towards the end is the for (;;) loop that loops
> > forever
> > > testing all your manual switches and such. Let's conditionally set the
> > > Limits just before the "for" statement.
> > >
> > > TK
> >
> >
> >
>


Group: DynoMotion Message: 1214 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I dont see what is wrong, can you look at program?
Mach3_CL_PMDX-125(Version4).c
http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

Thanks,
Troy

--- TK wrote:
>
> You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
>
> if ()
> {
> }
> else
> {
> }
>
> TK
>
> On May 29, 2011, at 8:49 PM, "tmday7" <tmday@...> wrote:
>
> > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> >
> > // Debounce a bit
> > //
> > // return 1 one time when first debounced high
> > // return 0 one time when first debounced low
> > // return -1 otherwise
> > #define DBTIME 300
> >
> > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > { <<<<<<right here is where i get the Compile Error
> > int v = -1;
> >
> > if (n == *last) // same as last time?
> > {
> > if (*cnt == DBTIME-1)
> > {
> > if (n != *lastsolid)
> > {
> > v = *lastsolid = n; // return debounced value
> > }
> > }
> > if (*cnt < DBTIME) (*cnt)++;
> > }
> > else
> > {
> > *cnt = 0; // reset count
> > }
> > *last = n;
> > return v;
> > }
> >
> > Troy
> >
> >
> >
> > --- Tom Kerekes wrote:
> > >
> > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > >
> > > How about trying this: I think it is possible to download Mach3 DROs to
> > > KFlop while the axes are disabled and in EStop.
> > >
> > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > is a bit of overkill but it should work.
> > >
> > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > value of 1.0
> > >
> > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > NotifyPlugins(19040) 'Send it to KFLOP
> > >
> > >
> > > Here is how to download a 0.0
> > >
> > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > NotifyPlugins(19040) 'Send it to KFLOP
> > >
> > > Here is some C code to test and print the value. When merging this code
> > > into the Init program put the two definition lines right after main() into
> > > the Init program right after main() in a similar manner. Then put the 'If"
> > > statement down in front of the forever loop as we discussed. We might as
> > > well include the print statement to help debug.
> > >
> > >
> > > #include "KMotionDef.h"
> > > main()
> > > {
> > > #define DROIN 40
> > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > >
> > > printf("DRO = %f\n",*pin);
> > >
> > > if (*pin == 0)
> > > {
> > > ch0->LimitSwitchOptions = 0x0606000f;
> > > ch1->LimitSwitchOptions = 0x0707000f;
> > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > }
> > > else
> > > {
> > > ch0->LimitSwitchOptions = 0x0;
> > > ch1->LimitSwitchOptions = 0x0;
> > > ch2->LimitSwitchOptions = 0x0;
> > > }
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > >
> > > >
> > > >
> > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > being ignored.
> > > > Whats next?
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > for statement is very powerful and can consist of something to do first
> > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > exit the loop (for example when a counter is 10), something to do after
> > > > each
> > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > exit
> > > > > condition, and increment are separated by semicolons. So for example to
> > > > > print the numbers 0 through 99 we could code:
> > > > >
> > > > > for (i=0; i<100; i++)
> > > > > {
> > > > > printf("%d\n",i);
> > > > > }
> > > > >
> > > > >
> > > > > In the extreme case when we don't need to do any of those things and
> > > > never
> > > > > want to exit it can be coded as:
> > > > >
> > > > > for (;;)
> > > > > {
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > }
> > > > >
> > > > >
> > > > > In your init program towards the end is the for (;;) loop that loops
> > > > forever
> > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > Limits just before the "for" statement.
> > > > >
> > > > > TK
> > > >
> > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1215 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Had another idea. Can C Code be added to watch for limit switch bits and when they are triggered, the normal EStop/ Axis Disable would then be able to clear, so Mach Reset could be cleared when user clicks Reset.
Only curious. :)

Thanks,
Troy

--- "tmday7" wrote:
>
> I dont see what is wrong, can you look at program?
> Mach3_CL_PMDX-125(Version4).c
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> Thanks,
> Troy
>
> --- TK wrote:
> >
> > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> >
> > if ()
> > {
> > }
> > else
> > {
> > }
> >
> > TK
> >
> > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> >
> > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > >
> > > // Debounce a bit
> > > //
> > > // return 1 one time when first debounced high
> > > // return 0 one time when first debounced low
> > > // return -1 otherwise
> > > #define DBTIME 300
> > >
> > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > { <<<<<<right here is where i get the Compile Error
> > > int v = -1;
> > >
> > > if (n == *last) // same as last time?
> > > {
> > > if (*cnt == DBTIME-1)
> > > {
> > > if (n != *lastsolid)
> > > {
> > > v = *lastsolid = n; // return debounced value
> > > }
> > > }
> > > if (*cnt < DBTIME) (*cnt)++;
> > > }
> > > else
> > > {
> > > *cnt = 0; // reset count
> > > }
> > > *last = n;
> > > return v;
> > > }
> > >
> > > Troy
> > >
> > >
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > >
> > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > KFlop while the axes are disabled and in EStop.
> > > >
> > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > is a bit of overkill but it should work.
> > > >
> > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > value of 1.0
> > > >
> > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > >
> > > > Here is how to download a 0.0
> > > >
> > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > > Here is some C code to test and print the value. When merging this code
> > > > into the Init program put the two definition lines right after main() into
> > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > statement down in front of the forever loop as we discussed. We might as
> > > > well include the print statement to help debug.
> > > >
> > > >
> > > > #include "KMotionDef.h"
> > > > main()
> > > > {
> > > > #define DROIN 40
> > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > >
> > > > printf("DRO = %f\n",*pin);
> > > >
> > > > if (*pin == 0)
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > }
> > > > else
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0;
> > > > ch1->LimitSwitchOptions = 0x0;
> > > > ch2->LimitSwitchOptions = 0x0;
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > >
> > > > >
> > > > >
> > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > being ignored.
> > > > > Whats next?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > for statement is very powerful and can consist of something to do first
> > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > each
> > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > exit
> > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > print the numbers 0 through 99 we could code:
> > > > > >
> > > > > > for (i=0; i<100; i++)
> > > > > > {
> > > > > > printf("%d\n",i);
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In the extreme case when we don't need to do any of those things and
> > > > > never
> > > > > > want to exit it can be coded as:
> > > > > >
> > > > > > for (;;)
> > > > > > {
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > forever
> > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > Limits just before the "for" statement.
> > > > > >
> > > > > > TK
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1216 From: Tom Kerekes Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
There was an extra Curly bracket near the top so it was essentially:
 
main()
{
{
     body of main program
}
 
I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
 
I uploaded version 5 give that a try.
Thanks
TK
 
 
 
 
 
 
 


--- On Mon, 5/30/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Monday, May 30, 2011, 7:15 AM

 
I dont see what is wrong, can you look at program?
Mach3_CL_PMDX-125(Version4).c
http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

Thanks,
Troy

--- TK wrote:
>
> You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
>
> if ()
> {
> }
> else
> {
> }
>
> TK
>
> On May 29, 2011, at 8:49 PM, "tmday7" <tmday@...> wrote:
>
> > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> >
> > // Debounce a bit
> > //
> > // return 1 one time when first debounced high
> > // return 0 one time when first debounced low
> > // return -1 otherwise
> > #define DBTIME 300
> >
> > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > { <<<<<<right here is where i get the Compile Error
> > int v = -1;
> >
> > if (n == *last) // same as last time?
> > {
> > if (*cnt == DBTIME-1)
> > {
> > if (n != *lastsolid)
> > {
> > v = *lastsolid = n; // return debounced value
> > }
> > }
> > if (*cnt < DBTIME) (*cnt)++;
> > }
> > else
> > {
> > *cnt = 0; // reset count
> > }
> > *last = n;
> > return v;
> > }
> >
> > Troy
> >
> >
> >
> > --- Tom Kerekes wrote:
> > >
> > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > >
> > > How about trying this: I think it is possible to download Mach3 DROs to
> > > KFlop while the axes are disabled and in EStop.
> > >
> > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > is a bit of overkill but it should work.
> > >
> > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > value of 1.0
> > >
> > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > NotifyPlugins(19040) 'Send it to KFLOP
> > >
> > >
> > > Here is how to download a 0.0
> > >
> > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > NotifyPlugins(19040) 'Send it to KFLOP
> > >
> > > Here is some C code to test and print the value. When merging this code
> > > into the Init program put the two definition lines right after main() into
> > > the Init program right after main() in a similar manner. Then put the 'If"
> > > statement down in front of the forever loop as we discussed. We might as
> > > well include the print statement to help debug.
> > >
> > >
> > > #include "KMotionDef.h"
> > > main()
> > > {
> > > #define DROIN 40
> > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > >
> > > printf("DRO = %f\n",*pin);
> > >
> > > if (*pin == 0)
> > > {
> > > ch0->LimitSwitchOptions = 0x0606000f;
> > > ch1->LimitSwitchOptions = 0x0707000f;
> > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > }
> > > else
> > > {
> > > ch0->LimitSwitchOptions = 0x0;
> > > ch1->LimitSwitchOptions = 0x0;
> > > ch2->LimitSwitchOptions = 0x0;
> > > }
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > >
> > > >
> > > >
> > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > being ignored.
> > > > Whats next?
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > for statement is very powerful and can consist of something to do first
> > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > exit the loop (for example when a counter is 10), something to do after
> > > > each
> > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > exit
> > > > > condition, and increment are separated by semicolons. So for example to
> > > > > print the numbers 0 through 99 we could code:
> > > > >
> > > > > for (i=0; i<100; i++)
> > > > > {
> > > > > printf("%d\n",i);
> > > > > }
> > > > >
> > > > >
> > > > > In the extreme case when we don't need to do any of those things and
> > > > never
> > > > > want to exit it can be coded as:
> > > > >
> > > > > for (;;)
> > > > > {
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > // this loop stuff will be executed forever
> > > > > }
> > > > >
> > > > >
> > > > > In your init program towards the end is the for (;;) loop that loops
> > > > forever
> > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > Limits just before the "for" statement.
> > > > >
> > > > > TK
> > > >
> > > >
> > > >
> > >
> >
>

Group: DynoMotion Message: 1217 From: Tom Kerekes Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I don't follow your idea exactly, but yes you could write a "watchdog" type of program that monitored anything and everything you wish and then faulted however you wish.  One thought might be to disable the axes on the transition into the limit rather than the state of the limit.  That way a limit estop would only occur once and we would be able to (and need to) move back inside and then back out to generate another.  But there is some danger in this. 
TK

--- On Mon, 5/30/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Monday, May 30, 2011, 8:47 AM

 
Had another idea. Can C Code be added to watch for limit switch bits and when they are triggered, the normal EStop/ Axis Disable would then be able to clear, so Mach Reset could be cleared when user clicks Reset.
Only curious. :)

Thanks,
Troy

--- "tmday7" wrote:
>
> I dont see what is wrong, can you look at program?
> Mach3_CL_PMDX-125(Version4).c
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> Thanks,
> Troy
>
> --- TK wrote:
> >
> > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> >
> > if ()
> > {
> > }
> > else
> > {
> > }
> >
> > TK
> >
> > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> >
> > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > >
> > > // Debounce a bit
> > > //
> > > // return 1 one time when first debounced high
> > > // return 0 one time when first debounced low
> > > // return -1 otherwise
> > > #define DBTIME 300
> > >
> > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > { <<<<<<right here is where i get the Compile Error
> > > int v = -1;
> > >
> > > if (n == *last) // same as last time?
> > > {
> > > if (*cnt == DBTIME-1)
> > > {
> > > if (n != *lastsolid)
> > > {
> > > v = *lastsolid = n; // return debounced value
> > > }
> > > }
> > > if (*cnt < DBTIME) (*cnt)++;
> > > }
> > > else
> > > {
> > > *cnt = 0; // reset count
> > > }
> > > *last = n;
> > > return v;
> > > }
> > >
> > > Troy
> > >
> > >
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > >
> > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > KFlop while the axes are disabled and in EStop.
> > > >
> > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > is a bit of overkill but it should work.
> > > >
> > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > value of 1.0
> > > >
> > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > >
> > > > Here is how to download a 0.0
> > > >
> > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > > Here is some C code to test and print the value. When merging this code
> > > > into the Init program put the two definition lines right after main() into
> > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > statement down in front of the forever loop as we discussed. We might as
> > > > well include the print statement to help debug.
> > > >
> > > >
> > > > #include "KMotionDef.h"
> > > > main()
> > > > {
> > > > #define DROIN 40
> > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > >
> > > > printf("DRO = %f\n",*pin);
> > > >
> > > > if (*pin == 0)
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > }
> > > > else
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0;
> > > > ch1->LimitSwitchOptions = 0x0;
> > > > ch2->LimitSwitchOptions = 0x0;
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > >
> > > > >
> > > > >
> > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > being ignored.
> > > > > Whats next?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > for statement is very powerful and can consist of something to do first
> > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > each
> > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > exit
> > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > print the numbers 0 through 99 we could code:
> > > > > >
> > > > > > for (i=0; i<100; i++)
> > > > > > {
> > > > > > printf("%d\n",i);
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In the extreme case when we don't need to do any of those things and
> > > > > never
> > > > > > want to exit it can be coded as:
> > > > > >
> > > > > > for (;;)
> > > > > > {
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > forever
> > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > Limits just before the "for" statement.
> > > > > >
> > > > > > TK
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

Group: DynoMotion Message: 1219 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Getting closer :)
Program works, but i cant get limit switch options to Enable.
Here is VB i have in 2 seperate buttons in Mach...

Disable button....
SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
NotifyPlugins(19040) 'Send it to KFLOP
DoOEMButton (150)

Enable Button...
SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
NotifyPlugins(19041) 'Send it to KFLOP

I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.

if (msg==19040)
{
// User wants to disable Limit Switch Options on X,Y,Z
ch0->LimitSwitchOptions=0x0;
ch1->LimitSwitchOptions=0x0;
ch2->LimitSwitchOptions=0x0;

}

if (msg==19041)
{
// User wants to enable Limit Switch Options on X,Y,Z
ch0->LimitSwitchOptions=0x606000f;
ch1->LimitSwitchOptions=0x707000f;
ch2->LimitSwitchOptions=0xf0f000f;

}

}

Thanks,
Troy


--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> There was an extra Curly bracket near the top so it was essentially:
>  
> main()
> {
> {
>      body of main program
> }
>  
> I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
>  
> I uploaded version 5 give that a try.
> Thanks
> TK
>  
>  
>  
>  
>  
>  
>  
>
>
> --- On Mon, 5/30/11, tmday7 <tmday@...> wrote:
>
>
> From: tmday7 <tmday@...>
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> To: DynoMotion@yahoogroups.com
> Date: Monday, May 30, 2011, 7:15 AM
>
>
>  
>
>
>
> I dont see what is wrong, can you look at program?
> Mach3_CL_PMDX-125(Version4).c
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> Thanks,
> Troy
>
> --- TK wrote:
> >
> > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> >
> > if ()
> > {
> > }
> > else
> > {
> > }
> >
> > TK
> >
> > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> >
> > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > >
> > > // Debounce a bit
> > > //
> > > // return 1 one time when first debounced high
> > > // return 0 one time when first debounced low
> > > // return -1 otherwise
> > > #define DBTIME 300
> > >
> > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > { <<<<<<right here is where i get the Compile Error
> > > int v = -1;
> > >
> > > if (n == *last) // same as last time?
> > > {
> > > if (*cnt == DBTIME-1)
> > > {
> > > if (n != *lastsolid)
> > > {
> > > v = *lastsolid = n; // return debounced value
> > > }
> > > }
> > > if (*cnt < DBTIME) (*cnt)++;
> > > }
> > > else
> > > {
> > > *cnt = 0; // reset count
> > > }
> > > *last = n;
> > > return v;
> > > }
> > >
> > > Troy
> > >
> > >
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > >
> > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > KFlop while the axes are disabled and in EStop.
> > > >
> > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > is a bit of overkill but it should work.
> > > >
> > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > value of 1.0
> > > >
> > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > >
> > > > Here is how to download a 0.0
> > > >
> > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > > Here is some C code to test and print the value. When merging this code
> > > > into the Init program put the two definition lines right after main() into
> > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > statement down in front of the forever loop as we discussed. We might as
> > > > well include the print statement to help debug.
> > > >
> > > >
> > > > #include "KMotionDef.h"
> > > > main()
> > > > {
> > > > #define DROIN 40
> > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > >
> > > > printf("DRO = %f\n",*pin);
> > > >
> > > > if (*pin == 0)
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > }
> > > > else
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0;
> > > > ch1->LimitSwitchOptions = 0x0;
> > > > ch2->LimitSwitchOptions = 0x0;
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > >
> > > > >
> > > > >
> > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > being ignored.
> > > > > Whats next?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > for statement is very powerful and can consist of something to do first
> > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > each
> > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > exit
> > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > print the numbers 0 through 99 we could code:
> > > > > >
> > > > > > for (i=0; i<100; i++)
> > > > > > {
> > > > > > printf("%d\n",i);
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In the extreme case when we don't need to do any of those things and
> > > > > never
> > > > > > want to exit it can be coded as:
> > > > > >
> > > > > > for (;;)
> > > > > > {
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > forever
> > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > Limits just before the "for" statement.
> > > > > >
> > > > > > TK
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1220 From: Tom Kerekes Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
ok Troy, change:
 
NotifyPlugins(19041)
 
to
 
NotifyPlugins(19040)
We want to download the 0.0 or 1.0 to the same DRO #40
 
 
Actually the messages in the 19000 range only download the DRO values and do not invoke the Notify.c program in KFLOP so there is no point in putting message handlers for those.
 
So to handle the cases when we are not in estop and we just want to enable or disable limits without doining RESET we need to add additional NotifyPlugins() for that which are in the 10000-10999 range.
 
TK
 
 
 
 
 
 

--- On Mon, 5/30/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Monday, May 30, 2011, 11:06 AM

 
Getting closer :)
Program works, but i cant get limit switch options to Enable.
Here is VB i have in 2 seperate buttons in Mach...

Disable button....
SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
NotifyPlugins(19040) 'Send it to KFLOP
DoOEMButton (150)

Enable Button...
SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
NotifyPlugins(19041) 'Send it to KFLOP

I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.

if (msg==19040)
{
// User wants to disable Limit Switch Options on X,Y,Z
ch0->LimitSwitchOptions=0x0;
ch1->LimitSwitchOptions=0x0;
ch2->LimitSwitchOptions=0x0;

}

if (msg==19041)
{
// User wants to enable Limit Switch Options on X,Y,Z
ch0->LimitSwitchOptions=0x606000f;
ch1->LimitSwitchOptions=0x707000f;
ch2->LimitSwitchOptions=0xf0f000f;

}

}

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> There was an extra Curly bracket near the top so it was essentially:
>  
> main()
> {
> {
>      body of main program
> }
>  
> I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
>  
> I uploaded version 5 give that a try.
> Thanks
> TK
>  
>  
>  
>  
>  
>  
>  
>
>
> --- On Mon, 5/30/11, tmday7 <tmday@...> wrote:
>
>
> From: tmday7 <tmday@...>
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> To: DynoMotion@yahoogroups.com
> Date: Monday, May 30, 2011, 7:15 AM
>
>
>  
>
>
>
> I dont see what is wrong, can you look at program?
> Mach3_CL_PMDX-125(Version4).c
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> Thanks,
> Troy
>
> --- TK wrote:
> >
> > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> >
> > if ()
> > {
> > }
> > else
> > {
> > }
> >
> > TK
> >
> > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> >
> > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > >
> > > // Debounce a bit
> > > //
> > > // return 1 one time when first debounced high
> > > // return 0 one time when first debounced low
> > > // return -1 otherwise
> > > #define DBTIME 300
> > >
> > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > { <<<<<<right here is where i get the Compile Error
> > > int v = -1;
> > >
> > > if (n == *last) // same as last time?
> > > {
> > > if (*cnt == DBTIME-1)
> > > {
> > > if (n != *lastsolid)
> > > {
> > > v = *lastsolid = n; // return debounced value
> > > }
> > > }
> > > if (*cnt < DBTIME) (*cnt)++;
> > > }
> > > else
> > > {
> > > *cnt = 0; // reset count
> > > }
> > > *last = n;
> > > return v;
> > > }
> > >
> > > Troy
> > >
> > >
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > >
> > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > KFlop while the axes are disabled and in EStop.
> > > >
> > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > is a bit of overkill but it should work.
> > > >
> > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > value of 1.0
> > > >
> > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > >
> > > > Here is how to download a 0.0
> > > >
> > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > >
> > > > Here is some C code to test and print the value. When merging this code
> > > > into the Init program put the two definition lines right after main() into
> > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > statement down in front of the forever loop as we discussed. We might as
> > > > well include the print statement to help debug.
> > > >
> > > >
> > > > #include "KMotionDef.h"
> > > > main()
> > > > {
> > > > #define DROIN 40
> > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > >
> > > > printf("DRO = %f\n",*pin);
> > > >
> > > > if (*pin == 0)
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > }
> > > > else
> > > > {
> > > > ch0->LimitSwitchOptions = 0x0;
> > > > ch1->LimitSwitchOptions = 0x0;
> > > > ch2->LimitSwitchOptions = 0x0;
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > >
> > > > >
> > > > >
> > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > being ignored.
> > > > > Whats next?
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > for statement is very powerful and can consist of something to do first
> > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > each
> > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > exit
> > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > print the numbers 0 through 99 we could code:
> > > > > >
> > > > > > for (i=0; i<100; i++)
> > > > > > {
> > > > > > printf("%d\n",i);
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In the extreme case when we don't need to do any of those things and
> > > > > never
> > > > > > want to exit it can be coded as:
> > > > > >
> > > > > > for (;;)
> > > > > > {
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > // this loop stuff will be executed forever
> > > > > > }
> > > > > >
> > > > > >
> > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > forever
> > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > Limits just before the "for" statement.
> > > > > >
> > > > > > TK
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

Group: DynoMotion Message: 1221 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
:) Got it. Added a 10401 message with LimitSwitchOptions enable, and put NotifyPlugins(10401) in my limit switch enable button, in Mach.
All works great. :)
Thanks again,
Troy

--- Tom Kerekes wrote:
>
> ok Troy, change:
>  
> NotifyPlugins(19041)
>  
> to
>  
> NotifyPlugins(19040)
>
> We want to download the 0.0 or 1.0 to the same DRO #40
>  
>  
> Actually the messages in the 19000 range only download the DRO values and do not invoke the Notify.c program in KFLOP so there is no point in putting message handlers for those.
>  
> So to handle the cases when we are not in estop and we just want to enable or disable limits without doining RESET we need to add additional NotifyPlugins() for that which are in the 10000-10999 range.
>  
> TK
>  
>  
>  
>  
>  
>  
>
> --- On Mon, 5/30/11, tmday7 <tmday@...> wrote:
>
>
> From: tmday7 <tmday@...>
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> To: DynoMotion@yahoogroups.com
> Date: Monday, May 30, 2011, 11:06 AM
>
>
>  
>
>
>
> Getting closer :)
> Program works, but i cant get limit switch options to Enable.
> Here is VB i have in 2 seperate buttons in Mach...
>
> Disable button....
> SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> NotifyPlugins(19040) 'Send it to KFLOP
> DoOEMButton (150)
>
> Enable Button...
> SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> NotifyPlugins(19041) 'Send it to KFLOP
>
> I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
>
> if (msg==19040)
> {
> // User wants to disable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x0;
> ch1->LimitSwitchOptions=0x0;
> ch2->LimitSwitchOptions=0x0;
>
> }
>
> if (msg==19041)
> {
> // User wants to enable Limit Switch Options on X,Y,Z
> ch0->LimitSwitchOptions=0x606000f;
> ch1->LimitSwitchOptions=0x707000f;
> ch2->LimitSwitchOptions=0xf0f000f;
>
> }
>
> }
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >  
> > There was an extra Curly bracket near the top so it was essentially:
> >  
> > main()
> > {
> > {
> >      body of main program
> > }
> >  
> > I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
> >  
> > I uploaded version 5 give that a try.
> > Thanks
> > TK
> >  
> >  
> >  
> >  
> >  
> >  
> >  
> >
> >
> > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7 <tmday@>
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > To: DynoMotion@yahoogroups.com
> > Date: Monday, May 30, 2011, 7:15 AM
> >
> >
> >  
> >
> >
> >
> > I dont see what is wrong, can you look at program?
> > Mach3_CL_PMDX-125(Version4).c
> > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> >
> > Thanks,
> > Troy
> >
> > --- TK wrote:
> > >
> > > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> > >
> > > if ()
> > > {
> > > }
> > > else
> > > {
> > > }
> > >
> > > TK
> > >
> > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > >
> > > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > > >
> > > > // Debounce a bit
> > > > //
> > > > // return 1 one time when first debounced high
> > > > // return 0 one time when first debounced low
> > > > // return -1 otherwise
> > > > #define DBTIME 300
> > > >
> > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > { <<<<<<right here is where i get the Compile Error
> > > > int v = -1;
> > > >
> > > > if (n == *last) // same as last time?
> > > > {
> > > > if (*cnt == DBTIME-1)
> > > > {
> > > > if (n != *lastsolid)
> > > > {
> > > > v = *lastsolid = n; // return debounced value
> > > > }
> > > > }
> > > > if (*cnt < DBTIME) (*cnt)++;
> > > > }
> > > > else
> > > > {
> > > > *cnt = 0; // reset count
> > > > }
> > > > *last = n;
> > > > return v;
> > > > }
> > > >
> > > > Troy
> > > >
> > > >
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > > >
> > > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > > KFlop while the axes are disabled and in EStop.
> > > > >
> > > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > > is a bit of overkill but it should work.
> > > > >
> > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > > value of 1.0
> > > > >
> > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > >
> > > > >
> > > > > Here is how to download a 0.0
> > > > >
> > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > >
> > > > > Here is some C code to test and print the value. When merging this code
> > > > > into the Init program put the two definition lines right after main() into
> > > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > > statement down in front of the forever loop as we discussed. We might as
> > > > > well include the print statement to help debug.
> > > > >
> > > > >
> > > > > #include "KMotionDef.h"
> > > > > main()
> > > > > {
> > > > > #define DROIN 40
> > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > >
> > > > > printf("DRO = %f\n",*pin);
> > > > >
> > > > > if (*pin == 0)
> > > > > {
> > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > }
> > > > > else
> > > > > {
> > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > }
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > > being ignored.
> > > > > > Whats next?
> > > > > > Troy
> > > > > >
> > > > > > --- Tom Kerekes wrote:
> > > > > > >
> > > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > > for statement is very powerful and can consist of something to do first
> > > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > > each
> > > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > > exit
> > > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > > print the numbers 0 through 99 we could code:
> > > > > > >
> > > > > > > for (i=0; i<100; i++)
> > > > > > > {
> > > > > > > printf("%d\n",i);
> > > > > > > }
> > > > > > >
> > > > > > >
> > > > > > > In the extreme case when we don't need to do any of those things and
> > > > > > never
> > > > > > > want to exit it can be coded as:
> > > > > > >
> > > > > > > for (;;)
> > > > > > > {
> > > > > > > // this loop stuff will be executed forever
> > > > > > > // this loop stuff will be executed forever
> > > > > > > // this loop stuff will be executed forever
> > > > > > > // this loop stuff will be executed forever
> > > > > > > // this loop stuff will be executed forever
> > > > > > > }
> > > > > > >
> > > > > > >
> > > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > > forever
> > > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > > Limits just before the "for" statement.
> > > > > > >
> > > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1222 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I also added my latest NotifyProgram to yahoo folder.

--- "tmday7" wrote:
>
> :) Got it. Added a 10401 message with LimitSwitchOptions enable, and put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> All works great. :)
> Thanks again,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > ok Troy, change:
> >  
> > NotifyPlugins(19041)
> >  
> > to
> >  
> > NotifyPlugins(19040)
> >
> > We want to download the 0.0 or 1.0 to the same DRO #40
> >  
> >  
> > Actually the messages in the 19000 range only download the DRO values and do not invoke the Notify.c program in KFLOP so there is no point in putting message handlers for those.
> >  
> > So to handle the cases when we are not in estop and we just want to enable or disable limits without doining RESET we need to add additional NotifyPlugins() for that which are in the 10000-10999 range.
> >  
> > TK
> >  
> >  
> >  
> >  
> >  
> >  
> >
> > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7 <tmday@>
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > To: DynoMotion@yahoogroups.com
> > Date: Monday, May 30, 2011, 11:06 AM
> >
> >
> >  
> >
> >
> >
> > Getting closer :)
> > Program works, but i cant get limit switch options to Enable.
> > Here is VB i have in 2 seperate buttons in Mach...
> >
> > Disable button....
> > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19040) 'Send it to KFLOP
> > DoOEMButton (150)
> >
> > Enable Button...
> > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19041) 'Send it to KFLOP
> >
> > I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> >
> > if (msg==19040)
> > {
> > // User wants to disable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x0;
> > ch1->LimitSwitchOptions=0x0;
> > ch2->LimitSwitchOptions=0x0;
> >
> > }
> >
> > if (msg==19041)
> > {
> > // User wants to enable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x606000f;
> > ch1->LimitSwitchOptions=0x707000f;
> > ch2->LimitSwitchOptions=0xf0f000f;
> >
> > }
> >
> > }
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > There was an extra Curly bracket near the top so it was essentially:
> > >  
> > > main()
> > > {
> > > {
> > >      body of main program
> > > }
> > >  
> > > I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
> > >  
> > > I uploaded version 5 give that a try.
> > > Thanks
> > > TK
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >
> > >
> > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > >
> > >
> > > From: tmday7 <tmday@>
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > To: DynoMotion@yahoogroups.com
> > > Date: Monday, May 30, 2011, 7:15 AM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > I dont see what is wrong, can you look at program?
> > > Mach3_CL_PMDX-125(Version4).c
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- TK wrote:
> > > >
> > > > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> > > >
> > > > if ()
> > > > {
> > > > }
> > > > else
> > > > {
> > > > }
> > > >
> > > > TK
> > > >
> > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > >
> > > > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > > > >
> > > > > // Debounce a bit
> > > > > //
> > > > > // return 1 one time when first debounced high
> > > > > // return 0 one time when first debounced low
> > > > > // return -1 otherwise
> > > > > #define DBTIME 300
> > > > >
> > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > { <<<<<<right here is where i get the Compile Error
> > > > > int v = -1;
> > > > >
> > > > > if (n == *last) // same as last time?
> > > > > {
> > > > > if (*cnt == DBTIME-1)
> > > > > {
> > > > > if (n != *lastsolid)
> > > > > {
> > > > > v = *lastsolid = n; // return debounced value
> > > > > }
> > > > > }
> > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > }
> > > > > else
> > > > > {
> > > > > *cnt = 0; // reset count
> > > > > }
> > > > > *last = n;
> > > > > return v;
> > > > > }
> > > > >
> > > > > Troy
> > > > >
> > > > >
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > > > >
> > > > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > > > KFlop while the axes are disabled and in EStop.
> > > > > >
> > > > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > > > is a bit of overkill but it should work.
> > > > > >
> > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > > > value of 1.0
> > > > > >
> > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > >
> > > > > > Here is how to download a 0.0
> > > > > >
> > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > > Here is some C code to test and print the value. When merging this code
> > > > > > into the Init program put the two definition lines right after main() into
> > > > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > > > statement down in front of the forever loop as we discussed. We might as
> > > > > > well include the print statement to help debug.
> > > > > >
> > > > > >
> > > > > > #include "KMotionDef.h"
> > > > > > main()
> > > > > > {
> > > > > > #define DROIN 40
> > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > >
> > > > > > printf("DRO = %f\n",*pin);
> > > > > >
> > > > > > if (*pin == 0)
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > > > being ignored.
> > > > > > > Whats next?
> > > > > > > Troy
> > > > > > >
> > > > > > > --- Tom Kerekes wrote:
> > > > > > > >
> > > > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > > > for statement is very powerful and can consist of something to do first
> > > > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > > > each
> > > > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > > > exit
> > > > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > >
> > > > > > > > for (i=0; i<100; i++)
> > > > > > > > {
> > > > > > > > printf("%d\n",i);
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In the extreme case when we don't need to do any of those things and
> > > > > > > never
> > > > > > > > want to exit it can be coded as:
> > > > > > > >
> > > > > > > > for (;;)
> > > > > > > > {
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > > > forever
> > > > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > > > Limits just before the "for" statement.
> > > > > > > >
> > > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1223 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Now i have a new one. :)

If user wants to run a Gcode in Mach3 without all axis moving, so to Dry Run Gcode, and view the ToolPath, how is this done?

Mach3 does it by whats called Offline.

I think this has already been done, but i cant get it to work.

Thanks,
Troy
Group: DynoMotion Message: 1224 From: tmday7 Date: 5/30/2011
Subject: Re: KFLOP Setup on a Mill/Drill
:) :) Been thinking again.
Any way to have LimitSwitchOptions auto enable once the axis is moved off of limit switch? Maybe by watching the bit for each axis? Or would this cause a issue with the referencing sequence?

Boy, iam hard to please. ;)
Thanks,
Troy

--- "tmday7" wrote:
>
> :) Got it. Added a 10401 message with LimitSwitchOptions enable, and put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> All works great. :)
> Thanks again,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > ok Troy, change:
> >  
> > NotifyPlugins(19041)
> >  
> > to
> >  
> > NotifyPlugins(19040)
> >
> > We want to download the 0.0 or 1.0 to the same DRO #40
> >  
> >  
> > Actually the messages in the 19000 range only download the DRO values and do not invoke the Notify.c program in KFLOP so there is no point in putting message handlers for those.
> >  
> > So to handle the cases when we are not in estop and we just want to enable or disable limits without doining RESET we need to add additional NotifyPlugins() for that which are in the 10000-10999 range.
> >  
> > TK
> >  
> >  
> >  
> >  
> >  
> >  
> >
> > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7 <tmday@>
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > To: DynoMotion@yahoogroups.com
> > Date: Monday, May 30, 2011, 11:06 AM
> >
> >
> >  
> >
> >
> >
> > Getting closer :)
> > Program works, but i cant get limit switch options to Enable.
> > Here is VB i have in 2 seperate buttons in Mach...
> >
> > Disable button....
> > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19040) 'Send it to KFLOP
> > DoOEMButton (150)
> >
> > Enable Button...
> > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19041) 'Send it to KFLOP
> >
> > I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> >
> > if (msg==19040)
> > {
> > // User wants to disable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x0;
> > ch1->LimitSwitchOptions=0x0;
> > ch2->LimitSwitchOptions=0x0;
> >
> > }
> >
> > if (msg==19041)
> > {
> > // User wants to enable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x606000f;
> > ch1->LimitSwitchOptions=0x707000f;
> > ch2->LimitSwitchOptions=0xf0f000f;
> >
> > }
> >
> > }
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > There was an extra Curly bracket near the top so it was essentially:
> > >  
> > > main()
> > > {
> > > {
> > >      body of main program
> > > }
> > >  
> > > I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
> > >  
> > > I uploaded version 5 give that a try.
> > > Thanks
> > > TK
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >
> > >
> > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > >
> > >
> > > From: tmday7 <tmday@>
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > To: DynoMotion@yahoogroups.com
> > > Date: Monday, May 30, 2011, 7:15 AM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > I dont see what is wrong, can you look at program?
> > > Mach3_CL_PMDX-125(Version4).c
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- TK wrote:
> > > >
> > > > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> > > >
> > > > if ()
> > > > {
> > > > }
> > > > else
> > > > {
> > > > }
> > > >
> > > > TK
> > > >
> > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > >
> > > > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > > > >
> > > > > // Debounce a bit
> > > > > //
> > > > > // return 1 one time when first debounced high
> > > > > // return 0 one time when first debounced low
> > > > > // return -1 otherwise
> > > > > #define DBTIME 300
> > > > >
> > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > { <<<<<<right here is where i get the Compile Error
> > > > > int v = -1;
> > > > >
> > > > > if (n == *last) // same as last time?
> > > > > {
> > > > > if (*cnt == DBTIME-1)
> > > > > {
> > > > > if (n != *lastsolid)
> > > > > {
> > > > > v = *lastsolid = n; // return debounced value
> > > > > }
> > > > > }
> > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > }
> > > > > else
> > > > > {
> > > > > *cnt = 0; // reset count
> > > > > }
> > > > > *last = n;
> > > > > return v;
> > > > > }
> > > > >
> > > > > Troy
> > > > >
> > > > >
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > > > >
> > > > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > > > KFlop while the axes are disabled and in EStop.
> > > > > >
> > > > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > > > is a bit of overkill but it should work.
> > > > > >
> > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > > > value of 1.0
> > > > > >
> > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > >
> > > > > > Here is how to download a 0.0
> > > > > >
> > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > > Here is some C code to test and print the value. When merging this code
> > > > > > into the Init program put the two definition lines right after main() into
> > > > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > > > statement down in front of the forever loop as we discussed. We might as
> > > > > > well include the print statement to help debug.
> > > > > >
> > > > > >
> > > > > > #include "KMotionDef.h"
> > > > > > main()
> > > > > > {
> > > > > > #define DROIN 40
> > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > >
> > > > > > printf("DRO = %f\n",*pin);
> > > > > >
> > > > > > if (*pin == 0)
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > > > being ignored.
> > > > > > > Whats next?
> > > > > > > Troy
> > > > > > >
> > > > > > > --- Tom Kerekes wrote:
> > > > > > > >
> > > > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > > > for statement is very powerful and can consist of something to do first
> > > > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > > > each
> > > > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > > > exit
> > > > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > >
> > > > > > > > for (i=0; i<100; i++)
> > > > > > > > {
> > > > > > > > printf("%d\n",i);
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In the extreme case when we don't need to do any of those things and
> > > > > > > never
> > > > > > > > want to exit it can be coded as:
> > > > > > > >
> > > > > > > > for (;;)
> > > > > > > > {
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > > > forever
> > > > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > > > Limits just before the "for" statement.
> > > > > > > >
> > > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 1225 From: Tom Kerekes Date: 5/31/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
I thought "Offline" was supposed to be like your Manual Mode?
 
I'm not sure how you could do that.  There is an Option in the Mach3-Dynomotion-Plugin Configuration to define a bit for Offline.  The Plugin will then set or clear the specified bit in KFLOP.  You would then need to have this bit somehow disable your amplifiers or reconfigure KFLOP to not generate any motion.  I think setting the OutputGain parameter to zero will stop an motion.  If you really need this you will need to experiment around.
 
Regards
TK

--- On Mon, 5/30/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Monday, May 30, 2011, 1:52 PM

 
Now i have a new one. :)

If user wants to run a Gcode in Mach3 without all axis moving, so to Dry Run Gcode, and view the ToolPath, how is this done?

Mach3 does it by whats called Offline.

I think this has already been done, but i cant get it to work.

Thanks,
Troy

Group: DynoMotion Message: 1226 From: Tom Kerekes Date: 5/31/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
You might try it.  Maybe if you watch for a *transition* from something in a limit to nothing in a limit that would enable limits on the way in which is what is desired for homing anyway.  Code to watch for a transition might be coded like:
 
 
int SomethingInLimit, SomethingWasInLimit=0;
 
 
SomethingInLimit = ReadBit(XLimit) || ReadBit(YLimit) || ReadBit(ZLimit);
 
// check if we are not in any limits now but last time something was
if (!SomethingInLimit && SomethingWasInLimit)
{
    // enable the limits...
 
}
 
SomethingWasInLimit = SomethingInLimit;   // remember for next time 
 
 
 
TK

--- On Mon, 5/30/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Monday, May 30, 2011, 2:08 PM

 
:) :) Been thinking again.
Any way to have LimitSwitchOptions auto enable once the axis is moved off of limit switch? Maybe by watching the bit for each axis? Or would this cause a issue with the referencing sequence?

Boy, iam hard to please. ;)
Thanks,
Troy

--- "tmday7" wrote:
>
> :) Got it. Added a 10401 message with LimitSwitchOptions enable, and put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> All works great. :)
> Thanks again,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > ok Troy, change:
> >  
> > NotifyPlugins(19041)
> >  
> > to
> >  
> > NotifyPlugins(19040)
> >
> > We want to download the 0.0 or 1.0 to the same DRO #40
> >  
> >  
> > Actually the messages in the 19000 range only download the DRO values and do not invoke the Notify.c program in KFLOP so there is no point in putting message handlers for those.
> >  
> > So to handle the cases when we are not in estop and we just want to enable or disable limits without doining RESET we need to add additional NotifyPlugins() for that which are in the 10000-10999 range.
> >  
> > TK
> >  
> >  
> >  
> >  
> >  
> >  
> >
> > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7 <tmday@>
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > To: DynoMotion@yahoogroups.com
> > Date: Monday, May 30, 2011, 11:06 AM
> >
> >
> >  
> >
> >
> >
> > Getting closer :)
> > Program works, but i cant get limit switch options to Enable.
> > Here is VB i have in 2 seperate buttons in Mach...
> >
> > Disable button....
> > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19040) 'Send it to KFLOP
> > DoOEMButton (150)
> >
> > Enable Button...
> > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19041) 'Send it to KFLOP
> >
> > I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> >
> > if (msg==19040)
> > {
> > // User wants to disable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x0;
> > ch1->LimitSwitchOptions=0x0;
> > ch2->LimitSwitchOptions=0x0;
> >
> > }
> >
> > if (msg==19041)
> > {
> > // User wants to enable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x606000f;
> > ch1->LimitSwitchOptions=0x707000f;
> > ch2->LimitSwitchOptions=0xf0f000f;
> >
> > }
> >
> > }
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > There was an extra Curly bracket near the top so it was essentially:
> > >  
> > > main()
> > > {
> > > {
> > >      body of main program
> > > }
> > >  
> > > I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
> > >  
> > > I uploaded version 5 give that a try.
> > > Thanks
> > > TK
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >
> > >
> > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > >
> > >
> > > From: tmday7 <tmday@>
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > To: DynoMotion@yahoogroups.com
> > > Date: Monday, May 30, 2011, 7:15 AM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > I dont see what is wrong, can you look at program?
> > > Mach3_CL_PMDX-125(Version4).c
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- TK wrote:
> > > >
> > > > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> > > >
> > > > if ()
> > > > {
> > > > }
> > > > else
> > > > {
> > > > }
> > > >
> > > > TK
> > > >
> > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > >
> > > > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > > > >
> > > > > // Debounce a bit
> > > > > //
> > > > > // return 1 one time when first debounced high
> > > > > // return 0 one time when first debounced low
> > > > > // return -1 otherwise
> > > > > #define DBTIME 300
> > > > >
> > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > { <<<<<<right here is where i get the Compile Error
> > > > > int v = -1;
> > > > >
> > > > > if (n == *last) // same as last time?
> > > > > {
> > > > > if (*cnt == DBTIME-1)
> > > > > {
> > > > > if (n != *lastsolid)
> > > > > {
> > > > > v = *lastsolid = n; // return debounced value
> > > > > }
> > > > > }
> > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > }
> > > > > else
> > > > > {
> > > > > *cnt = 0; // reset count
> > > > > }
> > > > > *last = n;
> > > > > return v;
> > > > > }
> > > > >
> > > > > Troy
> > > > >
> > > > >
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > > > >
> > > > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > > > KFlop while the axes are disabled and in EStop.
> > > > > >
> > > > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > > > is a bit of overkill but it should work.
> > > > > >
> > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > > > value of 1.0
> > > > > >
> > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > >
> > > > > > Here is how to download a 0.0
> > > > > >
> > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > > Here is some C code to test and print the value. When merging this code
> > > > > > into the Init program put the two definition lines right after main() into
> > > > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > > > statement down in front of the forever loop as we discussed. We might as
> > > > > > well include the print statement to help debug.
> > > > > >
> > > > > >
> > > > > > #include "KMotionDef.h"
> > > > > > main()
> > > > > > {
> > > > > > #define DROIN 40
> > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > >
> > > > > > printf("DRO = %f\n",*pin);
> > > > > >
> > > > > > if (*pin == 0)
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > > > being ignored.
> > > > > > > Whats next?
> > > > > > > Troy
> > > > > > >
> > > > > > > --- Tom Kerekes wrote:
> > > > > > > >
> > > > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > > > for statement is very powerful and can consist of something to do first
> > > > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > > > each
> > > > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > > > exit
> > > > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > >
> > > > > > > > for (i=0; i<100; i++)
> > > > > > > > {
> > > > > > > > printf("%d\n",i);
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In the extreme case when we don't need to do any of those things and
> > > > > > > never
> > > > > > > > want to exit it can be coded as:
> > > > > > > >
> > > > > > > > for (;;)
> > > > > > > > {
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > > > forever
> > > > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > > > Limits just before the "for" statement.
> > > > > > > >
> > > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Group: DynoMotion Message: 1227 From: Lee Studley Date: 5/31/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 Also post some pictures. Sounds like you are doing an interesting retrofit.
-Lee

On 5/30/2011 2:08 PM, tmday7 wrote:
 

:) :) Been thinking again.
Any way to have LimitSwitchOptions auto enable once the axis is moved off of limit switch? Maybe by watching the bit for each axis? Or would this cause a issue with the referencing sequence?

Boy, iam hard to please. ;)
Thanks,
Troy

--- "tmday7" wrote:
>
> :) Got it. Added a 10401 message with LimitSwitchOptions enable, and put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> All works great. :)
> Thanks again,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > ok Troy, change:
> >  
> > NotifyPlugins(19041)
> >  
> > to
> >  
> > NotifyPlugins(19040)
> >
> > We want to download the 0.0 or 1.0 to the same DRO #40
> >  
> >  
> > Actually the messages in the 19000 range only download the DRO values and do not invoke the Notify.c program in KFLOP so there is no point in putting message handlers for those.
> >  
> > So to handle the cases when we are not in estop and we just want to enable or disable limits without doining RESET we need to add additional NotifyPlugins() for that which are in the 10000-10999 range.
> >  
> > TK
> >  
> >  
> >  
> >  
> >  
> >  
> >
> > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7 <tmday@>
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > To: DynoMotion@yahoogroups.com
> > Date: Monday, May 30, 2011, 11:06 AM
> >
> >
> >  
> >
> >
> >
> > Getting closer :)
> > Program works, but i cant get limit switch options to Enable.
> > Here is VB i have in 2 seperate buttons in Mach...
> >
> > Disable button....
> > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19040) 'Send it to KFLOP
> > DoOEMButton (150)
> >
> > Enable Button...
> > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > NotifyPlugins(19041) 'Send it to KFLOP
> >
> > I placed this in notify program, NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> >
> > if (msg==19040)
> > {
> > // User wants to disable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x0;
> > ch1->LimitSwitchOptions=0x0;
> > ch2->LimitSwitchOptions=0x0;
> >
> > }
> >
> > if (msg==19041)
> > {
> > // User wants to enable Limit Switch Options on X,Y,Z
> > ch0->LimitSwitchOptions=0x606000f;
> > ch1->LimitSwitchOptions=0x707000f;
> > ch2->LimitSwitchOptions=0xf0f000f;
> >
> > }
> >
> > }
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > There was an extra Curly bracket near the top so it was essentially:
> > >  
> > > main()
> > > {
> > > {
> > >      body of main program
> > > }
> > >  
> > > I'm glad I looked through it because I also realized we were disabling limits after enabling the axes rather than before.
> > >  
> > > I uploaded version 5 give that a try.
> > > Thanks
> > > TK
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >  
> > >
> > >
> > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > >
> > >
> > > From: tmday7 <tmday@>
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > To: DynoMotion@yahoogroups.com
> > > Date: Monday, May 30, 2011, 7:15 AM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > I dont see what is wrong, can you look at program?
> > > Mach3_CL_PMDX-125(Version4).c
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- TK wrote:
> > > >
> > > > You probably missed or copied an extra curly bracket. Curly brackets must always be in open/closed pairs. The "if" statement should have had two sets
> > > >
> > > > if ()
> > > > {
> > > > }
> > > > else
> > > > {
> > > > }
> > > >
> > > > TK
> > > >
> > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > >
> > > > > I replaced our previous C Code with this one you gave me and i get a Compile Error near the end of C program, see below....
> > > > >
> > > > > // Debounce a bit
> > > > > //
> > > > > // return 1 one time when first debounced high
> > > > > // return 0 one time when first debounced low
> > > > > // return -1 otherwise
> > > > > #define DBTIME 300
> > > > >
> > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > { <<<<<<right here is where i get the Compile Error
> > > > > int v = -1;
> > > > >
> > > > > if (n == *last) // same as last time?
> > > > > {
> > > > > if (*cnt == DBTIME-1)
> > > > > {
> > > > > if (n != *lastsolid)
> > > > > {
> > > > > v = *lastsolid = n; // return debounced value
> > > > > }
> > > > > }
> > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > }
> > > > > else
> > > > > {
> > > > > *cnt = 0; // reset count
> > > > > }
> > > > > *last = n;
> > > > > return v;
> > > > > }
> > > > >
> > > > > Troy
> > > > >
> > > > >
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > Ok you got me. This thing will fight us tooth and nail till the end :}
> > > > > >
> > > > > > How about trying this: I think it is possible to download Mach3 DROs to
> > > > > > KFlop while the axes are disabled and in EStop.
> > > > > >
> > > > > > Downloading a 64-bit floating point number from a DRO to be used as a flag
> > > > > > is a bit of overkill but it should work.
> > > > > >
> > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some VB to download a
> > > > > > value of 1.0
> > > > > >
> > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > >
> > > > > > Here is how to download a 0.0
> > > > > >
> > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > >
> > > > > > Here is some C code to test and print the value. When merging this code
> > > > > > into the Init program put the two definition lines right after main() into
> > > > > > the Init program right after main() in a similar manner. Then put the 'If"
> > > > > > statement down in front of the forever loop as we discussed. We might as
> > > > > > well include the print statement to help debug.
> > > > > >
> > > > > >
> > > > > > #include "KMotionDef.h"
> > > > > > main()
> > > > > > {
> > > > > > #define DROIN 40
> > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > >
> > > > > > printf("DRO = %f\n",*pin);
> > > > > >
> > > > > > if (*pin == 0)
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > }
> > > > > > }
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Ok, added just before the 'for', but when i click my LimitSwitch disable
> > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in the Console of
> > > > > > > Kmotion.Because Mach wont come out of Reset, so all buttons i click are
> > > > > > > being ignored.
> > > > > > > Whats next?
> > > > > > > Troy
> > > > > > >
> > > > > > > --- Tom Kerekes wrote:
> > > > > > > >
> > > > > > > > In C language a common way to form a loop is with a "for" statement. The
> > > > > > > > for statement is very powerful and can consist of something to do first
> > > > > > > > before the loop (ie set a counter to zero), a condition to decide when to
> > > > > > > > exit the loop (for example when a counter is 10), something to do after
> > > > > > > each
> > > > > > > > loop (ie increment a counter), and then the loop. Notice the initial,
> > > > > > > exit
> > > > > > > > condition, and increment are separated by semicolons. So for example to
> > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > >
> > > > > > > > for (i=0; i<100; i++)
> > > > > > > > {
> > > > > > > > printf("%d\n",i);
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In the extreme case when we don't need to do any of those things and
> > > > > > > never
> > > > > > > > want to exit it can be coded as:
> > > > > > > >
> > > > > > > > for (;;)
> > > > > > > > {
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > // this loop stuff will be executed forever
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > In your init program towards the end is the for (;;) loop that loops
> > > > > > > forever
> > > > > > > > testing all your manual switches and such. Let's conditionally set the
> > > > > > > > Limits just before the "for" statement.
> > > > > > > >
> > > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Group: DynoMotion Message: 1228 From: tmday7 Date: 5/31/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I have a few in the Photos area....
http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list

Thanks,
Troy

--- Lee Studley wrote:
>
> Hi Troy,
> Also post some pictures. Sounds like you are doing an interesting
> retrofit.
> -Lee
Group: DynoMotion Message: 1229 From: tmday7 Date: 5/31/2011
Subject: Re: KFLOP Setup on a Mill/Drill
There has been some changes sense these. Need to update soon. :) Dont want to many pics of it, its kinda ugly right now. ;) Work in progress.

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> I have a few in the Photos area....
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list
>
> Thanks,
> Troy
>
> --- Lee Studley wrote:
> >
> > Hi Troy,
> > Also post some pictures. Sounds like you are doing an interesting
> > retrofit.
> > -Lee
>
Group: DynoMotion Message: 1230 From: Bengt Sjoelund Date: 6/1/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,

Create another profile in Mach to do you dry runs in.
Cheers Bengt

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> Now i have a new one. :)
>
> If user wants to run a Gcode in Mach3 without all axis moving, so to Dry Run Gcode, and view the ToolPath, how is this done?
>
> Mach3 does it by whats called Offline.
>
> I think this has already been done, but i cant get it to work.
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1233 From: Lee Studley Date: 6/1/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Looks good! Interesting column and head unit. -Lee
Group: DynoMotion Message: 1234 From: tmday7 Date: 6/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hay Tom,
I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.

At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.

I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.


If i do MDI Rapid commands or run a GCode, there is no problem.
Dint we have a issue like this with the TriOnics? Anyhow, where to start first?

Thanks,
Troy
Group: DynoMotion Message: 1235 From: tmday7 Date: 6/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
One more thing to add. I disabled Closed Loop and get the hard "clunk" at stop of axis but no Stepper Driver fault.

--- "tmday7" wrote:
>
> Hay Tom,
> I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
>
> At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
>
> I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
>
>
> If i do MDI Rapid commands or run a GCode, there is no problem.
> Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1236 From: TK Date: 6/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
What do you mean by Stepper Driver Fault?

TK

On Jun 2, 2011, at 7:41 PM, "tmday7" <tmday@...> wrote:

 

One more thing to add. I disabled Closed Loop and get the hard "clunk" at stop of axis but no Stepper Driver fault.

--- "tmday7" wrote:
>
> Hay Tom,
> I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
>
> At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
>
> I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
>
>
> If i do MDI Rapid commands or run a GCode, there is no problem.
> Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
>
> Thanks,
> Troy
>

Group: DynoMotion Message: 1237 From: tmday7 Date: 6/2/2011
Subject: Re: KFLOP Setup on a Mill/Drill
My Gecko 203V Motor drivers go into fault.

--- TK <tk@...> wrote:
>
> What do you mean by Stepper Driver Fault?
>
> TK
>
> On Jun 2, 2011, at 7:41 PM, "tmday7" <tmday@...> wrote:
>
> > One more thing to add. I disabled Closed Loop and get the hard "clunk" at stop of axis but no Stepper Driver fault.
> >
> > --- "tmday7" wrote:
> > >
> > > Hay Tom,
> > > I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
> > >
> > > At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
> > >
> > > I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
> > >
> > >
> > > If i do MDI Rapid commands or run a GCode, there is no problem.
> > > Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
> > >
> > > Thanks,
> > > Troy
> > >
> >
> >
>
Group: DynoMotion Message: 1238 From: Tom Kerekes Date: 6/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
 
TK 
 
 


--- On Thu, 6/2/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Thursday, June 2, 2011, 7:39 PM

 
Hay Tom,
I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.

At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.

I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.

If i do MDI Rapid commands or run a GCode, there is no problem.
Dint we have a issue like this with the TriOnics? Anyhow, where to start first?

Thanks,
Troy

Group: DynoMotion Message: 1239 From: tmday7 Date: 6/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
This was a big improvement, but still need to tweek a little more.Take a look at my motor settings in updated file and let me know if anything sticks out to you.
http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
>  
> TK 
>  
>  
>
>
> --- On Thu, 6/2/11, tmday7wrote:
>
>

>
>
>  
>
>
>
> Hay Tom,
> I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
>
> At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
>
> I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
>
> If i do MDI Rapid commands or run a GCode, there is no problem.
> Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
>
> Thanks,
> Troy
>
Group: DynoMotion Message: 1240 From: Tom Kerekes Date: 6/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Troy,
 
Well I don't know much about your system but you have a Max Vel of 30000 and Max Accel of 200000.  Which means you expect to accelerate up to full speed in 30000/200000 = 0.15 seconds which is somewhat aggressive.  What is your resolution?  What do you have Mach "Motor Tuning" set at? 
 
Since you have encoders on your system plot the motion using the Step Response Screen and see exactly what is happening.
 
Regards
TK

--- On Fri, 6/3/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Friday, June 3, 2011, 2:49 PM

 
This was a big improvement, but still need to tweek a little more.Take a look at my motor settings in updated file and let me know if anything sticks out to you.
http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
>  
> TK 
>  
>  
>
>
> --- On Thu, 6/2/11, tmday7wrote:
>
>

>
>
>  
>
>
>
> Hay Tom,
> I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
>
> At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
>
> I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
>
> If i do MDI Rapid commands or run a GCode, there is no problem.
> Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
>
> Thanks,
> Troy
>

Group: DynoMotion Message: 1241 From: tmday7 Date: 6/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
"Max Vel of 30000 and Max Accel of 200000..."
Huhh...well, thats another thing i misunderstood. :) What would should the C program be , to match what i have set in Mach? Or am i looking at this wrong?

In Mach ... X and Y are 100 Velocity, Accel is 12, Z is 90 Vel and Accel is 10. Steps per is 15000

If you look at my pictures i posted of machine, it might give a little better idea.
http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list

Ill get back with you on the Step Response screen, maybe tomorrow or next day.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> Well I don't know much about your system but you have a Max Vel of 30000 and Max Accel of 200000.  Which means you expect to accelerate up to full speed in 30000/200000 = 0.15 seconds which is somewhat aggressive.  What is your resolution?  What do you have Mach "Motor Tuning" set at? 
>  
> Since you have encoders on your system plot the motion using the Step Response Screen and see exactly what is happening.
>  
> Regards
> TK
>
> --- On Fri, 6/3/11, tmday7 <tmday@...> wrote:
>
>
> From: tmday7 <tmday@...>
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> To: DynoMotion@yahoogroups.com
> Date: Friday, June 3, 2011, 2:49 PM
>
>
>  
>
>
>
> This was a big improvement, but still need to tweek a little more.Take a look at my motor settings in updated file and let me know if anything sticks out to you.
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >  
> > What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
> >  
> > TK 
> >  
> >  
> >
> >
> > --- On Thu, 6/2/11, tmday7wrote:
> >
> >
>
> >
> >
> >  
> >
> >
> >
> > Hay Tom,
> > I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
> >
> > At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
> >
> > I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
> >
> > If i do MDI Rapid commands or run a GCode, there is no problem.
> > Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
> >
> > Thanks,
> > Troy
> >
>
Group: DynoMotion Message: 1242 From: Tom Kerekes Date: 6/3/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Vel of 100ipm =1.67ips x 15000 usteps/inch = 25000 usteps/sec
 
Accel of 12 in/sec^2 x 15000 usteps/inch = 180000 usteps/sec^2

--- On Fri, 6/3/11, tmday7 <tmday@...> wrote:

From: tmday7 <tmday@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Friday, June 3, 2011, 5:08 PM

 
"Max Vel of 30000 and Max Accel of 200000..."
Huhh...well, thats another thing i misunderstood. :) What would should the C program be , to match what i have set in Mach? Or am i looking at this wrong?

In Mach ... X and Y are 100 Velocity, Accel is 12, Z is 90 Vel and Accel is 10. Steps per is 15000

If you look at my pictures i posted of machine, it might give a little better idea.
http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list

Ill get back with you on the Step Response screen, maybe tomorrow or next day.

Thanks,
Troy

--- Tom Kerekes wrote:
>
> Hi Troy,
>  
> Well I don't know much about your system but you have a Max Vel of 30000 and Max Accel of 200000.  Which means you expect to accelerate up to full speed in 30000/200000 = 0.15 seconds which is somewhat aggressive.  What is your resolution?  What do you have Mach "Motor Tuning" set at? 
>  
> Since you have encoders on your system plot the motion using the Step Response Screen and see exactly what is happening.
>  
> Regards
> TK
>
> --- On Fri, 6/3/11, tmday7 <tmday@...> wrote:
>
>
> From: tmday7 <tmday@...>
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> To: DynoMotion@yahoogroups.com
> Date: Friday, June 3, 2011, 2:49 PM
>
>
>  
>
>
>
> This was a big improvement, but still need to tweek a little more.Take a look at my motor settings in updated file and let me know if anything sticks out to you.
> http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >  
> > What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
> >  
> > TK 
> >  
> >  
> >
> >
> > --- On Thu, 6/2/11, tmday7wrote:
> >
> >
>
> >
> >
> >  
> >
> >
> >
> > Hay Tom,
> > I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
> >
> > At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
> >
> > I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
> >
> > If i do MDI Rapid commands or run a GCode, there is no problem.
> > Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
> >
> > Thanks,
> > Troy
> >
>

Group: DynoMotion Message: 1248 From: tmday7 Date: 6/4/2011
Subject: Re: KFLOP Setup on a Mill/Drill
That got it, as far as using keyboard for jogging. I uploaded screen shots of y axis with new settings. 6-4-2011(1) and 6-4-2011(2)

As for jogging with my Logitech Dual Action Gamepad, i use the joysticks to jog. The further you move joystick the faster axis jogs.

When ever i let off of joysticks the axis comes to a hard stop with a loud clunk. No matter how fast i jog.

Here is plugin for Gamepad
http://www.machsupport.com/forum/index.php?PHPSESSID=28sju7cj80mgc3c7n82dnbdqh4&topic=17385.0

Ill post a question on the forum and ask them about it also.
Thanks,
Troy

--- Tom Kerekes wrote:
>
> Vel of 100ipm =1.67ips x 15000 usteps/inch = 25000 usteps/sec
>  
> Accel of 12 in/sec^2 x 15000 usteps/inch = 180000 usteps/sec^2
>
> --- On Fri, 6/3/11, tmday7 <tmday@...> wrote:
>
>
> From: tmday7
>
>
>  
>
>
>
> "Max Vel of 30000 and Max Accel of 200000..."
> Huhh...well, thats another thing i misunderstood. :) What would should the C program be , to match what i have set in Mach? Or am i looking at this wrong?
>
> In Mach ... X and Y are 100 Velocity, Accel is 12, Z is 90 Vel and Accel is 10. Steps per is 15000
>
> If you look at my pictures i posted of machine, it might give a little better idea.
> http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list
>
> Ill get back with you on the Step Response screen, maybe tomorrow or next day.
>
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Hi Troy,
> >  
> > Well I don't know much about your system but you have a Max Vel of 30000 and Max Accel of 200000.  Which means you expect to accelerate up to full speed in 30000/200000 = 0.15 seconds which is somewhat aggressive.  What is your resolution?  What do you have Mach "Motor Tuning" set at? 
> >  
> > Since you have encoders on your system plot the motion using the Step Response Screen and see exactly what is happening.
> >  
> > Regards
> > TK
> >
> > --- On Fri, 6/3/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7 <tmday@>
> > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > To: DynoMotion@yahoogroups.com
> > Date: Friday, June 3, 2011, 2:49 PM
> >
> >
> >  
> >
> >
> >
> > This was a big improvement, but still need to tweek a little more.Take a look at my motor settings in updated file and let me know if anything sticks out to you.
> > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
> > >  
> > > TK 
> > >  
> > >  
> > >
> > >
> > > --- On Thu, 6/2/11, tmday7wrote:
> > >
> > >
> >
> > >
> > >
> > >  
> > >
> > >
> > >
> > > Hay Tom,
> > > I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
> > >
> > > At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
> > >
> > > I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
> > >
> > > If i do MDI Rapid commands or run a GCode, there is no problem.
> > > Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
> > >
> > > Thanks,
> > > Troy
> > >
> >
>
Group: DynoMotion Message: 1257 From: tmday7 Date: 6/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
I still think there is something else causing this, iam still getting a occasional error when using keyboard. I tried adjusting Velocity to 55000 in Kmotion, with about 2.5 inches of travel, WAY fast!:) It moved fine with no faults. That was also in closed loop and movement.

Seems like something is happening between Kflop and Mach, only when jogging. Faults out more constant with the Logitech Gamepad.

Should i be using any of the P or D settings in the C Program for motors? Right now there both set to 0

Troy

--- "tmday7" wrote:
>
> That got it, as far as using keyboard for jogging. I uploaded screen shots of y axis with new settings. 6-4-2011(1) and 6-4-2011(2)
>
> As for jogging with my Logitech Dual Action Gamepad, i use the joysticks to jog. The further you move joystick the faster axis jogs.
>
> When ever i let off of joysticks the axis comes to a hard stop with a loud clunk. No matter how fast i jog.
>
> Here is plugin for Gamepad
> http://www.machsupport.com/forum/index.php?PHPSESSID=28sju7cj80mgc3c7n82dnbdqh4&topic=17385.0
>
> Ill post a question on the forum and ask them about it also.
> Thanks,
> Troy
>
> --- Tom Kerekes wrote:
> >
> > Vel of 100ipm =1.67ips x 15000 usteps/inch = 25000 usteps/sec
> >  
> > Accel of 12 in/sec^2 x 15000 usteps/inch = 180000 usteps/sec^2
> >
> > --- On Fri, 6/3/11, tmday7 <tmday@> wrote:
> >
> >
> > From: tmday7
> >
> >
> >  
> >
> >
> >
> > "Max Vel of 30000 and Max Accel of 200000..."
> > Huhh...well, thats another thing i misunderstood. :) What would should the C program be , to match what i have set in Mach? Or am i looking at this wrong?
> >
> > In Mach ... X and Y are 100 Velocity, Accel is 12, Z is 90 Vel and Accel is 10. Steps per is 15000
> >
> > If you look at my pictures i posted of machine, it might give a little better idea.
> > http://groups.yahoo.com/group/DynoMotion/photos/album/176979248/pic/list
> >
> > Ill get back with you on the Step Response screen, maybe tomorrow or next day.
> >
> > Thanks,
> > Troy
> >
> > --- Tom Kerekes wrote:
> > >
> > > Hi Troy,
> > >  
> > > Well I don't know much about your system but you have a Max Vel of 30000 and Max Accel of 200000.  Which means you expect to accelerate up to full speed in 30000/200000 = 0.15 seconds which is somewhat aggressive.  What is your resolution?  What do you have Mach "Motor Tuning" set at? 
> > >  
> > > Since you have encoders on your system plot the motion using the Step Response Screen and see exactly what is happening.
> > >  
> > > Regards
> > > TK
> > >
> > > --- On Fri, 6/3/11, tmday7 <tmday@> wrote:
> > >
> > >
> > > From: tmday7 <tmday@>
> > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > To: DynoMotion@yahoogroups.com
> > > Date: Friday, June 3, 2011, 2:49 PM
> > >
> > >
> > >  
> > >
> > >
> > >
> > > This was a big improvement, but still need to tweek a little more.Take a look at my motor settings in updated file and let me know if anything sticks out to you.
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > >
> > > Thanks,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > Hi Troy,
> > > >  
> > > > What are your Velocity, Acceleration, and Jerk settings in KFLOP.  Try reducing the Acceleration.  Also set the Jerk value to 10X or more than the Acceleration value (that will cause the acceleration to be applied in 0.1 sec or less).  Mach3 motion ie G1 always applies instant Acceleration (infinite jerk) and uses its Motor Tuning Settings.  Jogging uses the KFLOP settings.  The Stepper Driver Error is probably because we are Disabling the drive due to Following Error.
> > > >  
> > > > TK 
> > > >  
> > > >  
> > > >
> > > >
> > > > --- On Thu, 6/2/11, tmday7wrote:
> > > >
> > > >
> > >
> > > >
> > > >
> > > >  
> > > >
> > > >
> > > >
> > > > Hay Tom,
> > > > I have a Jog issue. Whenever i use the arrow keys on the keyboard to jog axis, i get a axis fault, and a lot of times the Stepper Drive faults out. This only happens when i let OFF of arrow key, when axis is coming to a stop. Same problem when i use a Logitech Dual Action Gamepad with the JoyPad 2.0 plugin, to jog axis.
> > > >
> > > > At slower Jog rates there is a hard "clunk" when letting OFF arrow key and axis coming to a stop.Sometimes a fault afterwards.
> > > >
> > > > I have not been using jog axis to much till now, so didnt notice it.Seems to happen MOSTLY in the minus direction.
> > > >
> > > > If i do MDI Rapid commands or run a GCode, there is no problem.
> > > > Dint we have a issue like this with the TriOnics? Anyhow, where to start first?
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > >
> >
>
Group: DynoMotion Message: 1258 From: Marlon Date: 6/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi my name is Marlon. I just recently received my KFLOP.

I am fascinated by all this, and I would like to learn how to program my KFLOP. But I am a newbie at C programming, my skills a very basic (pun intended).

Where can a newbie like me go to learn more about definitions of things like code 1040, 19041, or how to set memory addresses like, "ch1->LimitSwitchOptions = 0x0707000f"

I've read the KFLOP manual but i did not see these types of code definitions there.

Is there some internet site or reference books that you guys might recommend, so that I can come up to speed on C programming skills?


At the moment I only have my X & Y axes operational , and am currently working on making brackets for the quill axis.

So in the meantime, I would like to learn how to write a C program for my limit switches and home the machine.

Any advice on references would be greatly appreciated. Thanks.



--- In DynoMotion@yahoogroups.com, Lee Studley <indigo_red@...> wrote:
>
> Hi Troy,
> Also post some pictures. Sounds like you are doing an interesting
> retrofit.
> -Lee
>
> On 5/30/2011 2:08 PM, tmday7 wrote:
> >
> > :) :) Been thinking again.
> > Any way to have LimitSwitchOptions auto enable once the axis is moved
> > off of limit switch? Maybe by watching the bit for each axis? Or would
> > this cause a issue with the referencing sequence?
> >
> > Boy, iam hard to please. ;)
> > Thanks,
> > Troy
> >
> > --- "tmday7" wrote:
> > >
> > > :) Got it. Added a 10401 message with LimitSwitchOptions enable, and
> > put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> > > All works great. :)
> > > Thanks again,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > ok Troy, change:
> > > > Â
> > > > NotifyPlugins(19041)
> > > > Â
> > > > to
> > > > Â
> > > > NotifyPlugins(19040)
> > > >
> > > > We want to download the 0.0 or 1.0 to the same DRO #40
> > > > Â
> > > > Â
> > > > Actually the messages in the 19000 range only download the DRO
> > values and do not invoke the Notify.c program in KFLOP so there is no
> > point in putting message handlers for those.
> > > > Â
> > > > So to handle the cases when we are not in estop and we just want
> > to enable or disable limits without doining RESET we need to add
> > additional NotifyPlugins() for that which are in the 10000-10999 range.
> > > > Â
> > > > TK
> > > > Â
> > > > Â
> > > > Â
> > > > Â
> > > > Â
> > > > Â
> > > >
> > > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > > >
> > > >
> > > > From: tmday7 <tmday@>
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > Date: Monday, May 30, 2011, 11:06 AM
> > > >
> > > >
> > > > Â
> > > >
> > > >
> > > >
> > > > Getting closer :)
> > > > Program works, but i cant get limit switch options to Enable.
> > > > Here is VB i have in 2 seperate buttons in Mach...
> > > >
> > > > Disable button....
> > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > DoOEMButton (150)
> > > >
> > > > Enable Button...
> > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19041) 'Send it to KFLOP
> > > >
> > > > I placed this in notify program,
> > NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> > > >
> > > > if (msg==19040)
> > > > {
> > > > // User wants to disable Limit Switch Options on X,Y,Z
> > > > ch0->LimitSwitchOptions=0x0;
> > > > ch1->LimitSwitchOptions=0x0;
> > > > ch2->LimitSwitchOptions=0x0;
> > > >
> > > > }
> > > >
> > > > if (msg==19041)
> > > > {
> > > > // User wants to enable Limit Switch Options on X,Y,Z
> > > > ch0->LimitSwitchOptions=0x606000f;
> > > > ch1->LimitSwitchOptions=0x707000f;
> > > > ch2->LimitSwitchOptions=0xf0f000f;
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > > Ã,Â
> > > > > There was an extra Curly bracket near the top so it was essentially:
> > > > > Ã,Â
> > > > > main()
> > > > > {
> > > > > {
> > > > > Ã, Ã, Ã, Ã, body of main program
> > > > > }
> > > > > Ã,Â
> > > > > I'm glad I looked through it because I also realized we were
> > disabling limits after enabling the axes rather than before.
> > > > > Ã,Â
> > > > > I uploaded version 5 give that a try.
> > > > > Thanks
> > > > > TK
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > >
> > > > >
> > > > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > > > >
> > > > >
> > > > > From: tmday7 <tmday@>
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > > Date: Monday, May 30, 2011, 7:15 AM
> > > > >
> > > > >
> > > > > Ã,Â
> > > > >
> > > > >
> > > > >
> > > > > I dont see what is wrong, can you look at program?
> > > > > Mach3_CL_PMDX-125(Version4).c
> > > > >
> > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > --- TK wrote:
> > > > > >
> > > > > > You probably missed or copied an extra curly bracket. Curly
> > brackets must always be in open/closed pairs. The "if" statement
> > should have had two sets
> > > > > >
> > > > > > if ()
> > > > > > {
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > }
> > > > > >
> > > > > > TK
> > > > > >
> > > > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > > I replaced our previous C Code with this one you gave me and
> > i get a Compile Error near the end of C program, see below....
> > > > > > >
> > > > > > > // Debounce a bit
> > > > > > > //
> > > > > > > // return 1 one time when first debounced high
> > > > > > > // return 0 one time when first debounced low
> > > > > > > // return -1 otherwise
> > > > > > > #define DBTIME 300
> > > > > > >
> > > > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > > > { <<<<<<right here is where i get the Compile Error
> > > > > > > int v = -1;
> > > > > > >
> > > > > > > if (n == *last) // same as last time?
> > > > > > > {
> > > > > > > if (*cnt == DBTIME-1)
> > > > > > > {
> > > > > > > if (n != *lastsolid)
> > > > > > > {
> > > > > > > v = *lastsolid = n; // return debounced value
> > > > > > > }
> > > > > > > }
> > > > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > > > }
> > > > > > > else
> > > > > > > {
> > > > > > > *cnt = 0; // reset count
> > > > > > > }
> > > > > > > *last = n;
> > > > > > > return v;
> > > > > > > }
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --- Tom Kerekes wrote:
> > > > > > > >
> > > > > > > > Ok you got me. This thing will fight us tooth and nail
> > till the end :}
> > > > > > > >
> > > > > > > > How about trying this: I think it is possible to download
> > Mach3 DROs to
> > > > > > > > KFlop while the axes are disabled and in EStop.
> > > > > > > >
> > > > > > > > Downloading a 64-bit floating point number from a DRO to
> > be used as a flag
> > > > > > > > is a bit of overkill but it should work.
> > > > > > > >
> > > > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some
> > VB to download a
> > > > > > > > value of 1.0
> > > > > > > >
> > > > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > > > >
> > > > > > > >
> > > > > > > > Here is how to download a 0.0
> > > > > > > >
> > > > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > > > >
> > > > > > > > Here is some C code to test and print the value. When
> > merging this code
> > > > > > > > into the Init program put the two definition lines right
> > after main() into
> > > > > > > > the Init program right after main() in a similar manner.
> > Then put the 'If"
> > > > > > > > statement down in front of the forever loop as we
> > discussed. We might as
> > > > > > > > well include the print statement to help debug.
> > > > > > > >
> > > > > > > >
> > > > > > > > #include "KMotionDef.h"
> > > > > > > > main()
> > > > > > > > {
> > > > > > > > #define DROIN 40
> > > > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > > > >
> > > > > > > > printf("DRO = %f\n",*pin);
> > > > > > > >
> > > > > > > > if (*pin == 0)
> > > > > > > > {
> > > > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > > > }
> > > > > > > > else
> > > > > > > > {
> > > > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > > > }
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Ok, added just before the 'for', but when i click my
> > LimitSwitch disable
> > > > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in
> > the Console of
> > > > > > > > > Kmotion.Because Mach wont come out of Reset, so all
> > buttons i click are
> > > > > > > > > being ignored.
> > > > > > > > > Whats next?
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- Tom Kerekes wrote:
> > > > > > > > > >
> > > > > > > > > > In C language a common way to form a loop is with a
> > "for" statement. The
> > > > > > > > > > for statement is very powerful and can consist of
> > something to do first
> > > > > > > > > > before the loop (ie set a counter to zero), a
> > condition to decide when to
> > > > > > > > > > exit the loop (for example when a counter is 10),
> > something to do after
> > > > > > > > > each
> > > > > > > > > > loop (ie increment a counter), and then the loop.
> > Notice the initial,
> > > > > > > > > exit
> > > > > > > > > > condition, and increment are separated by semicolons.
> > So for example to
> > > > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > > > >
> > > > > > > > > > for (i=0; i<100; i++)
> > > > > > > > > > {
> > > > > > > > > > printf("%d\n",i);
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > In the extreme case when we don't need to do any of
> > those things and
> > > > > > > > > never
> > > > > > > > > > want to exit it can be coded as:
> > > > > > > > > >
> > > > > > > > > > for (;;)
> > > > > > > > > > {
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > In your init program towards the end is the for (;;)
> > loop that loops
> > > > > > > > > forever
> > > > > > > > > > testing all your manual switches and such. Let's
> > conditionally set the
> > > > > > > > > > Limits just before the "for" statement.
> > > > > > > > > >
> > > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>
Group: DynoMotion Message: 1259 From: Tom Kerekes Date: 6/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Hi Marlon,
 
For doing general things from Mach3 to KFLOP through the Plugin Mach3 has a NotifyPlugns(xxx) mechanism from Visual Basic. 
 
Values of 10000 to 10999 are used to have KFLOP execute some code and are passed to the KFLOP Notify.c program to handle.  See:
 
 
A special message 20000 is used for probing
 
 
 
Then these messages do not cause KFLOP to execute code, but rather pass a variable up or down. 
 
To Read from KFLOP to Mach3 use NotifyPlugins codes 18001 to 18050
To Write from Mach3 to KFLOP use NotifyPlugins codes 19001 to 19050

See:
 
 
 
How to set the hexidecimal code to directly define Limit Switch Options and other settings, data structures, and functions are described in the header file that is installed as:
 
<Install Dir>\DSP_KFLOP\KMotionDef.h
 
 

There are lots of C Language references on the web.  Here are a few:

 

 

 
 
Good Luck!
TK
 
 
 
 

--- On Sun, 6/5/11, Marlon <roller218@...> wrote:

From: Marlon <roller218@...>
Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
To: DynoMotion@yahoogroups.com
Date: Sunday, June 5, 2011, 3:28 PM

 
Hi my name is Marlon. I just recently received my KFLOP.

I am fascinated by all this, and I would like to learn how to program my KFLOP. But I am a newbie at C programming, my skills a very basic (pun intended).

Where can a newbie like me go to learn more about definitions of things like code 1040, 19041, or how to set memory addresses like, "ch1->LimitSwitchOptions = 0x0707000f"

I've read the KFLOP manual but i did not see these types of code definitions there.

Is there some internet site or reference books that you guys might recommend, so that I can come up to speed on C programming skills?

At the moment I only have my X & Y axes operational , and am currently working on making brackets for the quill axis.

So in the meantime, I would like to learn how to write a C program for my limit switches and home the machine.

Any advice on references would be greatly appreciated. Thanks.

--- In DynoMotion@yahoogroups.com, Lee Studley <indigo_red@...> wrote:
>
> Hi Troy,
> Also post some pictures. Sounds like you are doing an interesting
> retrofit.
> -Lee
>
> On 5/30/2011 2:08 PM, tmday7 wrote:
> >
> > :) :) Been thinking again.
> > Any way to have LimitSwitchOptions auto enable once the axis is moved
> > off of limit switch? Maybe by watching the bit for each axis? Or would
> > this cause a issue with the referencing sequence?
> >
> > Boy, iam hard to please. ;)
> > Thanks,
> > Troy
> >
> > --- "tmday7" wrote:
> > >
> > > :) Got it. Added a 10401 message with LimitSwitchOptions enable, and
> > put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> > > All works great. :)
> > > Thanks again,
> > > Troy
> > >
> > > --- Tom Kerekes wrote:
> > > >
> > > > ok Troy, change:
> > > > Â
> > > > NotifyPlugins(19041)
> > > > Â
> > > > to
> > > > Â
> > > > NotifyPlugins(19040)
> > > >
> > > > We want to download the 0.0 or 1.0 to the same DRO #40
> > > > Â
> > > > Â
> > > > Actually the messages in the 19000 range only download the DRO
> > values and do not invoke the Notify.c program in KFLOP so there is no
> > point in putting message handlers for those.
> > > > Â
> > > > So to handle the cases when we are not in estop and we just want
> > to enable or disable limits without doining RESET we need to add
> > additional NotifyPlugins() for that which are in the 10000-10999 range.
> > > > Â
> > > > TK
> > > > Â
> > > > Â
> > > > Â
> > > > Â
> > > > Â
> > > > Â
> > > >
> > > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > > >
> > > >
> > > > From: tmday7 <tmday@>
> > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > Date: Monday, May 30, 2011, 11:06 AM
> > > >
> > > >
> > > > Â
> > > >
> > > >
> > > >
> > > > Getting closer :)
> > > > Program works, but i cant get limit switch options to Enable.
> > > > Here is VB i have in 2 seperate buttons in Mach...
> > > >
> > > > Disable button....
> > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > DoOEMButton (150)
> > > >
> > > > Enable Button...
> > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > NotifyPlugins(19041) 'Send it to KFLOP
> > > >
> > > > I placed this in notify program,
> > NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> > > >
> > > > if (msg==19040)
> > > > {
> > > > // User wants to disable Limit Switch Options on X,Y,Z
> > > > ch0->LimitSwitchOptions=0x0;
> > > > ch1->LimitSwitchOptions=0x0;
> > > > ch2->LimitSwitchOptions=0x0;
> > > >
> > > > }
> > > >
> > > > if (msg==19041)
> > > > {
> > > > // User wants to enable Limit Switch Options on X,Y,Z
> > > > ch0->LimitSwitchOptions=0x606000f;
> > > > ch1->LimitSwitchOptions=0x707000f;
> > > > ch2->LimitSwitchOptions=0xf0f000f;
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > > Thanks,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > Hi Troy,
> > > > > Ã,Â
> > > > > There was an extra Curly bracket near the top so it was essentially:
> > > > > Ã,Â
> > > > > main()
> > > > > {
> > > > > {
> > > > > Ã, Ã, Ã, Ã, body of main program
> > > > > }
> > > > > Ã,Â
> > > > > I'm glad I looked through it because I also realized we were
> > disabling limits after enabling the axes rather than before.
> > > > > Ã,Â
> > > > > I uploaded version 5 give that a try.
> > > > > Thanks
> > > > > TK
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > > Ã,Â
> > > > >
> > > > >
> > > > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > > > >
> > > > >
> > > > > From: tmday7 <tmday@>
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > > Date: Monday, May 30, 2011, 7:15 AM
> > > > >
> > > > >
> > > > > Ã,Â
> > > > >
> > > > >
> > > > >
> > > > > I dont see what is wrong, can you look at program?
> > > > > Mach3_CL_PMDX-125(Version4).c
> > > > >
> > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > --- TK wrote:
> > > > > >
> > > > > > You probably missed or copied an extra curly bracket. Curly
> > brackets must always be in open/closed pairs. The "if" statement
> > should have had two sets
> > > > > >
> > > > > > if ()
> > > > > > {
> > > > > > }
> > > > > > else
> > > > > > {
> > > > > > }
> > > > > >
> > > > > > TK
> > > > > >
> > > > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > > I replaced our previous C Code with this one you gave me and
> > i get a Compile Error near the end of C program, see below....
> > > > > > >
> > > > > > > // Debounce a bit
> > > > > > > //
> > > > > > > // return 1 one time when first debounced high
> > > > > > > // return 0 one time when first debounced low
> > > > > > > // return -1 otherwise
> > > > > > > #define DBTIME 300
> > > > > > >
> > > > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > > > { <<<<<<right here is where i get the Compile Error
> > > > > > > int v = -1;
> > > > > > >
> > > > > > > if (n == *last) // same as last time?
> > > > > > > {
> > > > > > > if (*cnt == DBTIME-1)
> > > > > > > {
> > > > > > > if (n != *lastsolid)
> > > > > > > {
> > > > > > > v = *lastsolid = n; // return debounced value
> > > > > > > }
> > > > > > > }
> > > > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > > > }
> > > > > > > else
> > > > > > > {
> > > > > > > *cnt = 0; // reset count
> > > > > > > }
> > > > > > > *last = n;
> > > > > > > return v;
> > > > > > > }
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --- Tom Kerekes wrote:
> > > > > > > >
> > > > > > > > Ok you got me. This thing will fight us tooth and nail
> > till the end :}
> > > > > > > >
> > > > > > > > How about trying this: I think it is possible to download
> > Mach3 DROs to
> > > > > > > > KFlop while the axes are disabled and in EStop.
> > > > > > > >
> > > > > > > > Downloading a 64-bit floating point number from a DRO to
> > be used as a flag
> > > > > > > > is a bit of overkill but it should work.
> > > > > > > >
> > > > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some
> > VB to download a
> > > > > > > > value of 1.0
> > > > > > > >
> > > > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > > > >
> > > > > > > >
> > > > > > > > Here is how to download a 0.0
> > > > > > > >
> > > > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > > > >
> > > > > > > > Here is some C code to test and print the value. When
> > merging this code
> > > > > > > > into the Init program put the two definition lines right
> > after main() into
> > > > > > > > the Init program right after main() in a similar manner.
> > Then put the 'If"
> > > > > > > > statement down in front of the forever loop as we
> > discussed. We might as
> > > > > > > > well include the print statement to help debug.
> > > > > > > >
> > > > > > > >
> > > > > > > > #include "KMotionDef.h"
> > > > > > > > main()
> > > > > > > > {
> > > > > > > > #define DROIN 40
> > > > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > > > >
> > > > > > > > printf("DRO = %f\n",*pin);
> > > > > > > >
> > > > > > > > if (*pin == 0)
> > > > > > > > {
> > > > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > > > }
> > > > > > > > else
> > > > > > > > {
> > > > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > > > }
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Ok, added just before the 'for', but when i click my
> > LimitSwitch disable
> > > > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in
> > the Console of
> > > > > > > > > Kmotion.Because Mach wont come out of Reset, so all
> > buttons i click are
> > > > > > > > > being ignored.
> > > > > > > > > Whats next?
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- Tom Kerekes wrote:
> > > > > > > > > >
> > > > > > > > > > In C language a common way to form a loop is with a
> > "for" statement. The
> > > > > > > > > > for statement is very powerful and can consist of
> > something to do first
> > > > > > > > > > before the loop (ie set a counter to zero), a
> > condition to decide when to
> > > > > > > > > > exit the loop (for example when a counter is 10),
> > something to do after
> > > > > > > > > each
> > > > > > > > > > loop (ie increment a counter), and then the loop.
> > Notice the initial,
> > > > > > > > > exit
> > > > > > > > > > condition, and increment are separated by semicolons.
> > So for example to
> > > > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > > > >
> > > > > > > > > > for (i=0; i<100; i++)
> > > > > > > > > > {
> > > > > > > > > > printf("%d\n",i);
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > In the extreme case when we don't need to do any of
> > those things and
> > > > > > > > > never
> > > > > > > > > > want to exit it can be coded as:
> > > > > > > > > >
> > > > > > > > > > for (;;)
> > > > > > > > > > {
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > In your init program towards the end is the for (;;)
> > loop that loops
> > > > > > > > > forever
> > > > > > > > > > testing all your manual switches and such. Let's
> > conditionally set the
> > > > > > > > > > Limits just before the "for" statement.
> > > > > > > > > >
> > > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> >
>

Group: DynoMotion Message: 1260 From: Marlon Date: 6/5/2011
Subject: Re: KFLOP Setup on a Mill/Drill
Tom, thanks for your suggestions. I've got lots of catching up to do. But I like to learn, so I'm really looking forward to this journey. Thanks,

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
>
>
>
>
>
> Hi Marlon,
>  
> For doing general things from Mach3 to KFLOP through the Plugin Mach3 has a NotifyPlugns(xxx) mechanism from Visual Basic. 
>  
> Values of 10000 to 10999 are used to have KFLOP execute some code and are passed to the KFLOP Notify.c program to handle.  See:
>  
> http://www.dynomotion.com/Help/Mach3Plugin/Mach3Encoders.htm
>  
> A special message 20000 is used for probing
>  
> http://www.dynomotion.com/Help/Mach3Plugin/Mach3Probe.htm
>  
>  
> Then these messages do not cause KFLOP to execute code, but rather pass a variable up or down. 
>  
> To Read from KFLOP to Mach3 use NotifyPlugins codes 18001 to 18050
> To Write from Mach3 to KFLOP use NotifyPlugins codes 19001 to 19050
>
> See:
>  
> http://www.dynomotion.com/Help/Mach3Plugin/Mach3DROs.htm
>  
>  
> How to set the hexidecimal code to directly define Limit Switch Options and other settings, data structures, and functions are described in the header file that is installed as:
>  
> <Install Dir>\DSP_KFLOP\KMotionDef.h
>  
>  
>
>
>
>
> There are lots of C Language references on the web.  Here are a few:
>  
>
>
> http://computer.howstuffworks.com/c4.htm
>
>
>  
>
> http://www.eskimo.com/%7Escs/cclass/notes/sx1.html
>
>
>
>  
>
> http://www.acm.uiuc.edu/webmonkeys/book/c_guide/
>  
>  
> Good Luck!
> TK
>  
>  
>  
>  
>
> --- On Sun, 6/5/11, Marlon <roller218@...> wrote:
>
>
> From: Marlon <roller218@...>
> Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> To: DynoMotion@yahoogroups.com
> Date: Sunday, June 5, 2011, 3:28 PM
>
>
>  
>
>
>
> Hi my name is Marlon. I just recently received my KFLOP.
>
> I am fascinated by all this, and I would like to learn how to program my KFLOP. But I am a newbie at C programming, my skills a very basic (pun intended).
>
> Where can a newbie like me go to learn more about definitions of things like code 1040, 19041, or how to set memory addresses like, "ch1->LimitSwitchOptions = 0x0707000f"
>
> I've read the KFLOP manual but i did not see these types of code definitions there.
>
> Is there some internet site or reference books that you guys might recommend, so that I can come up to speed on C programming skills?
>
> At the moment I only have my X & Y axes operational , and am currently working on making brackets for the quill axis.
>
> So in the meantime, I would like to learn how to write a C program for my limit switches and home the machine.
>
> Any advice on references would be greatly appreciated. Thanks.
>
> --- In DynoMotion@yahoogroups.com, Lee Studley <indigo_red@> wrote:
> >
> > Hi Troy,
> > Also post some pictures. Sounds like you are doing an interesting
> > retrofit.
> > -Lee
> >
> > On 5/30/2011 2:08 PM, tmday7 wrote:
> > >
> > > :) :) Been thinking again.
> > > Any way to have LimitSwitchOptions auto enable once the axis is moved
> > > off of limit switch? Maybe by watching the bit for each axis? Or would
> > > this cause a issue with the referencing sequence?
> > >
> > > Boy, iam hard to please. ;)
> > > Thanks,
> > > Troy
> > >
> > > --- "tmday7" wrote:
> > > >
> > > > :) Got it. Added a 10401 message with LimitSwitchOptions enable, and
> > > put NotifyPlugins(10401) in my limit switch enable button, in Mach.
> > > > All works great. :)
> > > > Thanks again,
> > > > Troy
> > > >
> > > > --- Tom Kerekes wrote:
> > > > >
> > > > > ok Troy, change:
> > > > > Â
> > > > > NotifyPlugins(19041)
> > > > > Â
> > > > > to
> > > > > Â
> > > > > NotifyPlugins(19040)
> > > > >
> > > > > We want to download the 0.0 or 1.0 to the same DRO #40
> > > > > Â
> > > > > Â
> > > > > Actually the messages in the 19000 range only download the DRO
> > > values and do not invoke the Notify.c program in KFLOP so there is no
> > > point in putting message handlers for those.
> > > > > Â
> > > > > So to handle the cases when we are not in estop and we just want
> > > to enable or disable limits without doining RESET we need to add
> > > additional NotifyPlugins() for that which are in the 10000-10999 range.
> > > > > Â
> > > > > TK
> > > > > Â
> > > > > Â
> > > > > Â
> > > > > Â
> > > > > Â
> > > > > Â
> > > > >
> > > > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > > > >
> > > > >
> > > > > From: tmday7 <tmday@>
> > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > > Date: Monday, May 30, 2011, 11:06 AM
> > > > >
> > > > >
> > > > > Â
> > > > >
> > > > >
> > > > >
> > > > > Getting closer :)
> > > > > Program works, but i cant get limit switch options to Enable.
> > > > > Here is VB i have in 2 seperate buttons in Mach...
> > > > >
> > > > > Disable button....
> > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > DoOEMButton (150)
> > > > >
> > > > > Enable Button...
> > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > NotifyPlugins(19041) 'Send it to KFLOP
> > > > >
> > > > > I placed this in notify program,
> > > NotifyZeroEncoderMach3(Version3).c, which is in yahoo folder.
> > > > >
> > > > > if (msg==19040)
> > > > > {
> > > > > // User wants to disable Limit Switch Options on X,Y,Z
> > > > > ch0->LimitSwitchOptions=0x0;
> > > > > ch1->LimitSwitchOptions=0x0;
> > > > > ch2->LimitSwitchOptions=0x0;
> > > > >
> > > > > }
> > > > >
> > > > > if (msg==19041)
> > > > > {
> > > > > // User wants to enable Limit Switch Options on X,Y,Z
> > > > > ch0->LimitSwitchOptions=0x606000f;
> > > > > ch1->LimitSwitchOptions=0x707000f;
> > > > > ch2->LimitSwitchOptions=0xf0f000f;
> > > > >
> > > > > }
> > > > >
> > > > > }
> > > > >
> > > > > Thanks,
> > > > > Troy
> > > > >
> > > > > --- Tom Kerekes wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > > Ã,Â
> > > > > > There was an extra Curly bracket near the top so it was essentially:
> > > > > > Ã,Â
> > > > > > main()
> > > > > > {
> > > > > > {
> > > > > > Ã, Ã, Ã, Ã, body of main program
> > > > > > }
> > > > > > Ã,Â
> > > > > > I'm glad I looked through it because I also realized we were
> > > disabling limits after enabling the axes rather than before.
> > > > > > Ã,Â
> > > > > > I uploaded version 5 give that a try.
> > > > > > Thanks
> > > > > > TK
> > > > > > Ã,Â
> > > > > > Ã,Â
> > > > > > Ã,Â
> > > > > > Ã,Â
> > > > > > Ã,Â
> > > > > > Ã,Â
> > > > > > Ã,Â
> > > > > >
> > > > > >
> > > > > > --- On Mon, 5/30/11, tmday7 <tmday@> wrote:
> > > > > >
> > > > > >
> > > > > > From: tmday7 <tmday@>
> > > > > > Subject: [DynoMotion] Re: KFLOP Setup on a Mill/Drill
> > > > > > To: DynoMotion@yahoogroups.com <mailto:DynoMotion%40yahoogroups.com>
> > > > > > Date: Monday, May 30, 2011, 7:15 AM
> > > > > >
> > > > > >
> > > > > > Ã,Â
> > > > > >
> > > > > >
> > > > > >
> > > > > > I dont see what is wrong, can you look at program?
> > > > > > Mach3_CL_PMDX-125(Version4).c
> > > > > >
> > > http://tech.groups.yahoo.com/group/DynoMotion/files/KFLOP%20MillDrill/
> > > > > >
> > > > > > Thanks,
> > > > > > Troy
> > > > > >
> > > > > > --- TK wrote:
> > > > > > >
> > > > > > > You probably missed or copied an extra curly bracket. Curly
> > > brackets must always be in open/closed pairs. The "if" statement
> > > should have had two sets
> > > > > > >
> > > > > > > if ()
> > > > > > > {
> > > > > > > }
> > > > > > > else
> > > > > > > {
> > > > > > > }
> > > > > > >
> > > > > > > TK
> > > > > > >
> > > > > > > On May 29, 2011, at 8:49 PM, "tmday7" <tmday@> wrote:
> > > > > > >
> > > > > > > > I replaced our previous C Code with this one you gave me and
> > > i get a Compile Error near the end of C program, see below....
> > > > > > > >
> > > > > > > > // Debounce a bit
> > > > > > > > //
> > > > > > > > // return 1 one time when first debounced high
> > > > > > > > // return 0 one time when first debounced low
> > > > > > > > // return -1 otherwise
> > > > > > > > #define DBTIME 300
> > > > > > > >
> > > > > > > > int Debounce(int n, int *cnt, int *last, int *lastsolid)
> > > > > > > > { <<<<<<right here is where i get the Compile Error
> > > > > > > > int v = -1;
> > > > > > > >
> > > > > > > > if (n == *last) // same as last time?
> > > > > > > > {
> > > > > > > > if (*cnt == DBTIME-1)
> > > > > > > > {
> > > > > > > > if (n != *lastsolid)
> > > > > > > > {
> > > > > > > > v = *lastsolid = n; // return debounced value
> > > > > > > > }
> > > > > > > > }
> > > > > > > > if (*cnt < DBTIME) (*cnt)++;
> > > > > > > > }
> > > > > > > > else
> > > > > > > > {
> > > > > > > > *cnt = 0; // reset count
> > > > > > > > }
> > > > > > > > *last = n;
> > > > > > > > return v;
> > > > > > > > }
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --- Tom Kerekes wrote:
> > > > > > > > >
> > > > > > > > > Ok you got me. This thing will fight us tooth and nail
> > > till the end :}
> > > > > > > > >
> > > > > > > > > How about trying this: I think it is possible to download
> > > Mach3 DROs to
> > > > > > > > > KFlop while the axes are disabled and in EStop.
> > > > > > > > >
> > > > > > > > > Downloading a 64-bit floating point number from a DRO to
> > > be used as a flag
> > > > > > > > > is a bit of overkill but it should work.
> > > > > > > > >
> > > > > > > > > Let's use Mach3 DRO 40 as the disable flag. Here is some
> > > VB to download a
> > > > > > > > > value of 1.0
> > > > > > > > >
> > > > > > > > > SetOEMDRO(1040,1.0) 'Put a value in a Mach DRO
> > > > > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Here is how to download a 0.0
> > > > > > > > >
> > > > > > > > > SetOEMDRO(1040,0.0) 'Put a value in a Mach DRO
> > > > > > > > > NotifyPlugins(19040) 'Send it to KFLOP
> > > > > > > > >
> > > > > > > > > Here is some C code to test and print the value. When
> > > merging this code
> > > > > > > > > into the Init program put the two definition lines right
> > > after main() into
> > > > > > > > > the Init program right after main() in a similar manner.
> > > Then put the 'If"
> > > > > > > > > statement down in front of the forever loop as we
> > > discussed. We might as
> > > > > > > > > well include the print statement to help debug.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > main()
> > > > > > > > > {
> > > > > > > > > #define DROIN 40
> > > > > > > > > double *pin = (double *)&persist.UserData[(DROIN -1)*2];
> > > > > > > > >
> > > > > > > > > printf("DRO = %f\n",*pin);
> > > > > > > > >
> > > > > > > > > if (*pin == 0)
> > > > > > > > > {
> > > > > > > > > ch0->LimitSwitchOptions = 0x0606000f;
> > > > > > > > > ch1->LimitSwitchOptions = 0x0707000f;
> > > > > > > > > ch2->LimitSwitchOptions = 0x0f0f000f;
> > > > > > > > > }
> > > > > > > > > else
> > > > > > > > > {
> > > > > > > > > ch0->LimitSwitchOptions = 0x0;
> > > > > > > > > ch1->LimitSwitchOptions = 0x0;
> > > > > > > > > ch2->LimitSwitchOptions = 0x0;
> > > > > > > > > }
> > > > > > > > > }
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Sun, May 29, 2011 at 4:56 PM, tmday7 tmday@ wrote:
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Ok, added just before the 'for', but when i click my
> > > LimitSwitch disable
> > > > > > > > > > button in Mach,"NotifyPlugins(10400)", nothing prints in
> > > the Console of
> > > > > > > > > > Kmotion.Because Mach wont come out of Reset, so all
> > > buttons i click are
> > > > > > > > > > being ignored.
> > > > > > > > > > Whats next?
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > --- Tom Kerekes wrote:
> > > > > > > > > > >
> > > > > > > > > > > In C language a common way to form a loop is with a
> > > "for" statement. The
> > > > > > > > > > > for statement is very powerful and can consist of
> > > something to do first
> > > > > > > > > > > before the loop (ie set a counter to zero), a
> > > condition to decide when to
> > > > > > > > > > > exit the loop (for example when a counter is 10),
> > > something to do after
> > > > > > > > > > each
> > > > > > > > > > > loop (ie increment a counter), and then the loop.
> > > Notice the initial,
> > > > > > > > > > exit
> > > > > > > > > > > condition, and increment are separated by semicolons.
> > > So for example to
> > > > > > > > > > > print the numbers 0 through 99 we could code:
> > > > > > > > > > >
> > > > > > > > > > > for (i=0; i<100; i++)
> > > > > > > > > > > {
> > > > > > > > > > > printf("%d\n",i);
> > > > > > > > > > > }
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > In the extreme case when we don't need to do any of
> > > those things and
> > > > > > > > > > never
> > > > > > > > > > > want to exit it can be coded as:
> > > > > > > > > > >
> > > > > > > > > > > for (;;)
> > > > > > > > > > > {
> > > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > > // this loop stuff will be executed forever
> > > > > > > > > > > }
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > In your init program towards the end is the for (;;)
> > > loop that loops
> > > > > > > > > > forever
> > > > > > > > > > > testing all your manual switches and such. Let's
> > > conditionally set the
> > > > > > > > > > > Limits just before the "for" statement.
> > > > > > > > > > >
> > > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
>